]> git.ipfire.org Git - thirdparty/mdadm.git/blame - systemd/mdmon@.service
install: use BINDIR consistently to locate mdadm and mdmon
[thirdparty/mdadm.git] / systemd / mdmon@.service
CommitLineData
0f7bdf89
JS
1# This file is part of mdadm.
2#
3# mdadm is free software; you can redistribute it and/or modify it
4# under the terms of the GNU General Public License as published by
5# the Free Software Foundation; either version 2 of the License, or
6# (at your option) any later version.
7
8[Unit]
9Description=MD Metadata Monitor on /dev/%I
10DefaultDependencies=no
11Before=initrd-switch-root.target
12
13[Service]
67ee2383
N
14# mdmon should never complain due to lack of a platform,
15# that is mdadm's job if at all.
16Environment=IMSM_NO_PLATFORM=1
8d1d32bb
N
17# The mdmon starting in the initramfs (with dracut at least)
18# cannot see sysfs after root is mounted, so we will have to
19# 'takeover'. As the '--offroot --takeover' don't hurt when
20# not necessary, are are useful with root-on-md in dracut,
21# have them always present.
85945e19 22ExecStart=BINDIR/mdmon --offroot --takeover %I
2167de78 23Type=forking
8d1d32bb
N
24# Don't set the PIDFile. It isn't necessary (systemd can work
25# it out) and systemd will remove it when transitioning from
26# initramfs to rootfs.
27#PIDFile=/run/mdadm/%I.pid
0f7bdf89 28KillMode=none