diff options
author | Jes Sorensen <Jes.Sorensen@redhat.com> | 2013-02-01 16:15:18 +0100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2013-02-05 05:40:38 +0100 |
commit | 0f7bdf8946316548500858303549e396655450c5 (patch) | |
tree | 9b298539d6e33df2496382afcc3acab9d1e4dc6d /systemd | |
parent | Remove --offroot argument and default to always setting argv[0] to @ (diff) | |
download | mdadm-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@.service | 18 |
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 |