summaryrefslogtreecommitdiffstats
path: root/systemd
diff options
context:
space:
mode:
authorJes Sorensen <Jes.Sorensen@redhat.com>2013-02-01 16:15:18 +0100
committerNeilBrown <neilb@suse.de>2013-02-05 05:40:38 +0100
commit0f7bdf8946316548500858303549e396655450c5 (patch)
tree9b298539d6e33df2496382afcc3acab9d1e4dc6d /systemd
parentRemove --offroot argument and default to always setting argv[0] to @ (diff)
downloadmdadm-0f7bdf8946316548500858303549e396655450c5.tar.xz
mdadm-0f7bdf8946316548500858303549e396655450c5.zip
Add support for launching mdmon via systemctl instead of fork/exec
If launching mdmon via systemctl fails, we fall back to the old method of fork/exec. This allows for having mdmon launched via systemctl which avoids problems with it getting killed by systemd due to it ending up in the parent's cgroup (udev). Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'systemd')
-rw-r--r--systemd/mdmon@.service18
1 files changed, 18 insertions, 0 deletions
diff --git a/systemd/mdmon@.service b/systemd/mdmon@.service
new file mode 100644
index 00000000..ddb475f2
--- /dev/null
+++ b/systemd/mdmon@.service
@@ -0,0 +1,18 @@
+# This file is part of mdadm.
+#
+# mdadm is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=MD Metadata Monitor on /dev/%I
+DefaultDependencies=no
+Before=initrd-switch-root.target
+
+[Service]
+ExecStart=/sbin/mdmon %I
+StandardInput=null
+StandardOutput=null
+StandardError=null
+KillMode=none