summaryrefslogtreecommitdiff
path: root/mdadm.c
diff options
context:
space:
mode:
Diffstat (limited to 'mdadm.c')
-rw-r--r--mdadm.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/mdadm.c b/mdadm.c
index f07fac2a..78f28d58 100644
--- a/mdadm.c
+++ b/mdadm.c
@@ -174,6 +174,15 @@ int main(int argc, char *argv[])
homehost = optarg;
continue;
+ /*
+ * --offroot sets first char of argv[0] to @. This is used
+ * by systemd to signal that the tast was launched from
+ * initrd/initramfs and should be preserved during shutdown
+ */
+ case OffRootOpt:
+ argv[0][0] = '@';
+ continue;
+
case ':':
case '?':
fputs(Usage, stderr);