1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-23 21:35:29 +03:00
lvm2/scripts/lvm2_lvmlocking_systemd_red_hat.service.in
Zdenek Kabelac d809fbb541 systemd: use proper sbindir path
Replace lowercase  @sbindir@  with  @SBINDIR@ which contains
fully decoded path.

Same with  @usrsbindir@ which is also used with clvmd and cmirrord.

Also handle SYSCONFDIR for EnvironmentFile.

Patch fixes generated unit files with strings like:
ExecStart=${exec_prefix}/sbin/lvm
2017-10-25 22:02:54 +02:00

25 lines
696 B
SYSTEMD

[Unit]
Description=Availability of lockspaces in lvmlockd
Documentation=man:lvmlockd(8)
After=lvm2-lvmlockd.service sanlock.service dlm.service
[Service]
Type=oneshot
RemainAfterExit=yes
# start lockspaces and wait for them to finish starting
ExecStart=@SBINDIR@/lvm vgchange --lock-start --lock-opt autowait
# auto activate LVs in the newly started lockd VGs
ExecStart=@SBINDIR@/lvm vgchange -aay -S 'locktype=sanlock || locktype=dlm'
# deactivate LVs in lockd VGs
ExecStop=@SBINDIR@/lvm vgchange -an -S 'locktype=sanlock || locktype=dlm'
# stop lockspaces and wait for them to finish stopping
ExecStop=@SBINDIR@/lvmlockctl --stop-lockspaces --wait 1
[Install]
WantedBy=multi-user.target