mirror of
git://sourceware.org/git/lvm2.git
synced 2025-02-21 05:57:48 +03:00
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
This commit is contained in:
parent
3f59969c3f
commit
d809fbb541
@ -7,7 +7,7 @@ Conflicts=shutdown.target
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/bin/true
|
||||
ExecStop=@sbindir@/blkdeactivate -u -l wholevg -m disablequeueing -r wait
|
||||
ExecStop=@SBINDIR@/blkdeactivate -u -l wholevg -m disablequeueing -r wait
|
||||
RemainAfterExit=yes
|
||||
|
||||
[Install]
|
||||
|
@ -1,5 +1,5 @@
|
||||
[D-BUS Service]
|
||||
Name=com.redhat.lvmdbus1
|
||||
Exec=@sbindir@/lvmdbusd --udev
|
||||
Exec=@SBINDIR@/lvmdbusd --udev
|
||||
User=root
|
||||
SystemdService=lvm2-lvmdbusd.service
|
||||
|
@ -9,7 +9,7 @@ DefaultDependencies=no
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=@sbindir@/dmeventd -f
|
||||
ExecStart=@SBINDIR@/dmeventd -f
|
||||
Environment=SD_ACTIVATION=1
|
||||
PIDFile=@DMEVENTD_PIDFILE@
|
||||
OOMScoreAdjust=-1000
|
||||
|
@ -9,7 +9,7 @@ Conflicts=shutdown.target
|
||||
[Service]
|
||||
Type=simple
|
||||
RemainAfterExit=yes
|
||||
EnvironmentFile=-@sysconfdir@/sysconfig/clvmd
|
||||
EnvironmentFile=-@SYSCONFDIR@/sysconfig/clvmd
|
||||
ExecStart=@systemdutildir@/lvm2-cluster-activation activate
|
||||
ExecStop=@systemdutildir@/lvm2-cluster-activation deactivate
|
||||
|
||||
|
@ -13,8 +13,8 @@ Conflicts=shutdown.target
|
||||
[Service]
|
||||
Type=forking
|
||||
Environment=CLVMD_OPTS=-T30
|
||||
EnvironmentFile=-@sysconfdir@/sysconfig/clvmd
|
||||
ExecStart=@sbindir@/clvmd $CLVMD_OPTS
|
||||
EnvironmentFile=-@SYSCONFDIR@/sysconfig/clvmd
|
||||
ExecStart=@USRSBINDIR@/clvmd $CLVMD_OPTS
|
||||
SuccessExitStatus=5
|
||||
TimeoutStartSec=30
|
||||
TimeoutStopSec=10
|
||||
|
@ -9,7 +9,7 @@ Conflicts=shutdown.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=@sbindir@/cmirrord
|
||||
ExecStart=@USRSBINDIR@/cmirrord
|
||||
PIDFile=@CMIRRORD_PIDFILE@
|
||||
Restart=on-abort
|
||||
|
||||
|
@ -5,7 +5,7 @@ Documentation=man:lvmdbusd(8)
|
||||
[Service]
|
||||
Type=dbus
|
||||
BusName=com.redhat.lvmdbus1
|
||||
ExecStart=@sbindir@/lvmdbusd
|
||||
ExecStart=@SBINDIR@/lvmdbusd
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
@ -9,7 +9,7 @@ Conflicts=shutdown.target
|
||||
[Service]
|
||||
Type=simple
|
||||
NonBlocking=true
|
||||
ExecStart=@sbindir@/lvmetad -f
|
||||
ExecStart=@SBINDIR@/lvmetad -f
|
||||
Environment=SD_ACTIVATION=1
|
||||
Restart=on-abort
|
||||
PIDFile=@LVMETAD_PIDFILE@
|
||||
|
@ -6,7 +6,7 @@ After=lvm2-lvmetad.service
|
||||
[Service]
|
||||
Type=simple
|
||||
NonBlocking=true
|
||||
ExecStart=@sbindir@/lvmlockd -f
|
||||
ExecStart=@SBINDIR@/lvmlockd -f
|
||||
Environment=SD_ACTIVATION=1
|
||||
PIDFile=@LVMLOCKD_PIDFILE@
|
||||
SendSIGKILL=no
|
||||
|
@ -8,16 +8,16 @@ Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
|
||||
# start lockspaces and wait for them to finish starting
|
||||
ExecStart=@sbindir@/vgchange --lock-start --lock-opt autowait
|
||||
ExecStart=@SBINDIR@/lvm vgchange --lock-start --lock-opt autowait
|
||||
|
||||
# auto activate LVs in the newly started lockd VGs
|
||||
ExecStart=@sbindir@/vgchange -aay -S 'locktype=sanlock || locktype=dlm'
|
||||
ExecStart=@SBINDIR@/lvm vgchange -aay -S 'locktype=sanlock || locktype=dlm'
|
||||
|
||||
# deactivate LVs in lockd VGs
|
||||
ExecStop=@sbindir@/vgchange -an -S 'locktype=sanlock || locktype=dlm'
|
||||
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
|
||||
ExecStop=@SBINDIR@/lvmlockctl --stop-lockspaces --wait 1
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
@ -9,7 +9,7 @@ Conflicts=shutdown.target
|
||||
[Service]
|
||||
Type=simple
|
||||
NonBlocking=true
|
||||
ExecStart=@sbindir@/lvmpolld -t 60 -f
|
||||
ExecStart=@SBINDIR@/lvmpolld -t 60 -f
|
||||
Environment=SD_ACTIVATION=1
|
||||
PIDFile=@LVMPOLLD_PIDFILE@
|
||||
|
||||
|
@ -10,8 +10,8 @@ Conflicts=shutdown.target
|
||||
[Service]
|
||||
Type=oneshot
|
||||
Environment=LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES=1
|
||||
ExecStart=@sbindir@/lvm vgchange --monitor y --ignoreskippedcluster
|
||||
ExecStop=@sbindir@/lvm vgchange --monitor n --ignoreskippedcluster
|
||||
ExecStart=@SBINDIR@/lvm vgchange --monitor y --ignoreskippedcluster
|
||||
ExecStop=@SBINDIR@/lvm vgchange --monitor n --ignoreskippedcluster
|
||||
RemainAfterExit=yes
|
||||
|
||||
[Install]
|
||||
|
@ -12,5 +12,5 @@ Conflicts=shutdown.target
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=@sbindir@/lvm pvscan --cache --activate ay %i
|
||||
ExecStop=@sbindir@/lvm pvscan --cache %i
|
||||
ExecStart=@SBINDIR@/lvm pvscan --cache --activate ay %i
|
||||
ExecStop=@SBINDIR@/lvm pvscan --cache %i
|
||||
|
Loading…
x
Reference in New Issue
Block a user