diff options
author | Jes Sorensen <Jes.Sorensen@redhat.com> | 2013-02-01 16:15:17 +0100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2013-02-05 15:06:47 +1100 |
commit | 3e23ba9d7bd3c2a9fbddc286014480672763e563 (patch) | |
tree | 71ac8d36f35cd2099b5747da00a3fcc00be33659 /mdadm.c | |
parent | e31dec228bbe68c55f8e601500f82c9492c96aae (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.c | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -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: |