summaryrefslogtreecommitdiff
path: root/mdadm.c
diff options
context:
space:
mode:
authorJes Sorensen <Jes.Sorensen@redhat.com>2013-02-01 16:15:17 +0100
committerNeilBrown <neilb@suse.de>2013-02-05 15:06:47 +1100
commit3e23ba9d7bd3c2a9fbddc286014480672763e563 (patch)
tree71ac8d36f35cd2099b5747da00a3fcc00be33659 /mdadm.c
parente31dec228bbe68c55f8e601500f82c9492c96aae (diff)
Remove --offroot argument and default to always setting argv[0] to @
We still allow --offroot to be given - for compatibility with scripts - but ignore it. The whole point of --offroot is to get systemd to not auto-kill mdmon, and we always want that. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'mdadm.c')
-rw-r--r--mdadm.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/mdadm.c b/mdadm.c
index 26e8ceca..f22fd7ba 100644
--- a/mdadm.c
+++ b/mdadm.c
@@ -116,6 +116,13 @@ int main(int argc, char *argv[])
ident.container = NULL;
ident.member = NULL;
+ /*
+ * set first char of argv[0] to @. This is used by
+ * systemd to signal that the task was launched from
+ * initrd/initramfs and should be preserved during shutdown
+ */
+ argv[0][0] = '@';
+
while ((option_index = -1) ,
(opt=getopt_long(argc, argv,
shortopt, long_options,
@@ -159,14 +166,8 @@ int main(int argc, char *argv[])
c.homehost = optarg;
continue;
- /*
- * --offroot sets first char of argv[0] to @. This is used
- * by systemd to signal that the task was launched from
- * initrd/initramfs and should be preserved during shutdown
- */
case OffRootOpt:
- argv[0][0] = '@';
- __offroot = 1;
+ /* Silently ignore old option */
continue;
case Prefer: