]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
mdmon: honour --offroot, again
authormwilck@arcor.de <mwilck@arcor.de>
Wed, 11 Sep 2013 20:15:19 +0000 (22:15 +0200)
committerNeilBrown <neilb@suse.de>
Thu, 12 Sep 2013 05:41:45 +0000 (15:41 +1000)
commit 3e32ba9d removed support for --offroot, and a9c15847 made
mdmon use @ in argv[0] only when started from initrd.

This breaks mdadm in OpenSUSE 12.3, which starts mdmon from the
root file system and relies on --offroot to work as documented earlier.

Reintroducing --offroot as an undocumented option, as its use is going to
go away soon anyway.

If this can't be applied, it should probably be included as distro-specific
patch if mdadm 3.3 is built for OpenSUSE 12.3. I haven't checked if the
patch is necesary for OpenSUSE Factory, too.

Signed-off-by: Martin Wilck <mwilck@arcor.de>
Signed-off-by: NeilBrown <neilb@suse.de>
mdmon.c

diff --git a/mdmon.c b/mdmon.c
index f0b062372b13f62587a17dd0f05636f78a2b0589..8cd53d8b24be4cf0936f90943e397cbe1d1ae97e 100644 (file)
--- a/mdmon.c
+++ b/mdmon.c
@@ -320,7 +320,7 @@ int main(int argc, char *argv[])
                        dofork = 0;
                        break;
                case OffRootOpt:
-                       /* silently ignore old option */
+                       argv[0][0] = '@';
                        break;
                case 'h':
                default: