Blame SOURCES/mdadm-3.2.6-mdmon-honour-offroot-again.patch

8c8931
From 5d79c72e16b32d7d6d0f535348286a7f2a966092 Mon Sep 17 00:00:00 2001
8c8931
From: "mwilck@arcor.de" <mwilck@arcor.de>
8c8931
Date: Wed, 11 Sep 2013 22:15:19 +0200
8c8931
Subject: [PATCH] mdmon: honour --offroot, again
8c8931
8c8931
commit 3e32ba9d removed support for --offroot, and a9c15847 made
8c8931
mdmon use @ in argv[0] only when started from initrd.
8c8931
8c8931
This breaks mdadm in OpenSUSE 12.3, which starts mdmon from the
8c8931
root file system and relies on --offroot to work as documented earlier.
8c8931
8c8931
Reintroducing --offroot as an undocumented option, as its use is going to
8c8931
go away soon anyway.
8c8931
8c8931
If this can't be applied, it should probably be included as distro-specific
8c8931
patch if mdadm 3.3 is built for OpenSUSE 12.3. I haven't checked if the
8c8931
patch is necesary for OpenSUSE Factory, too.
8c8931
8c8931
Signed-off-by: Martin Wilck <mwilck@arcor.de>
8c8931
Signed-off-by: NeilBrown <neilb@suse.de>
8c8931
---
8c8931
 mdmon.c | 2 +-
8c8931
 1 file changed, 1 insertion(+), 1 deletion(-)
8c8931
8c8931
diff --git a/mdmon.c b/mdmon.c
8c8931
index f0b0623..8cd53d8 100644
8c8931
--- a/mdmon.c
8c8931
+++ b/mdmon.c
8c8931
@@ -320,7 +320,7 @@ int main(int argc, char *argv[])
8c8931
 			dofork = 0;
8c8931
 			break;
8c8931
 		case OffRootOpt:
8c8931
-			/* silently ignore old option */
8c8931
+			argv[0][0] = '@';
8c8931
 			break;
8c8931
 		case 'h':
8c8931
 		default:
8c8931
-- 
8c8931
1.9.3
8c8931