summaryrefslogtreecommitdiff
path: root/mdmon.c
diff options
context:
space:
mode:
authorJes Sorensen <Jes.Sorensen@redhat.com>2012-01-25 15:18:03 +0100
committerNeilBrown <neilb@suse.de>2012-01-30 12:11:21 +1100
commitda827518c1f062e7d49433691d33e103525f9d6a (patch)
tree5c717d998e5128304eb444b634763ef61b9d03d2 /mdmon.c
parent08ca2adffffeb3bfda3cafababfc26706a60463b (diff)
Add --offroot argument to mdmon
Acked-by: Doug Ledford <dledford@redhat.com> Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'mdmon.c')
-rw-r--r--mdmon.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/mdmon.c b/mdmon.c
index a65c4a42..20934761 100644
--- a/mdmon.c
+++ b/mdmon.c
@@ -272,6 +272,10 @@ void usage(void)
" --help -h : This message\n"
" --all : All devices\n"
" --takeover -t : Takeover container\n"
+" --offroot : Set first character of argv[0] to @ to indicate the\n"
+" application was launched from initrd/initramfs and\n"
+" should not be shutdown by systemd as part of the\n"
+" regular shutdown process.\n"
);
exit(2);
}
@@ -291,6 +295,7 @@ int main(int argc, char *argv[])
{"all", 0, NULL, 'a'},
{"takeover", 0, NULL, 't'},
{"help", 0, NULL, 'h'},
+ {"offroot", 0, NULL, OffRootOpt},
{NULL, 0, NULL, 0}
};
@@ -304,6 +309,9 @@ int main(int argc, char *argv[])
container_name = optarg;
takeover = 1;
break;
+ case OffRootOpt:
+ argv[0][0] = '@';
+ break;
case 'h':
default:
usage();