1
0
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:
Zdenek Kabelac 2017-10-25 17:06:41 +02:00
parent 3f59969c3f
commit d809fbb541
13 changed files with 19 additions and 19 deletions

View File

@ -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]

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -9,7 +9,7 @@ Conflicts=shutdown.target
[Service]
Type=forking
ExecStart=@sbindir@/cmirrord
ExecStart=@USRSBINDIR@/cmirrord
PIDFile=@CMIRRORD_PIDFILE@
Restart=on-abort

View File

@ -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

View File

@ -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@

View File

@ -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

View File

@ -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

View File

@ -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@

View File

@ -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]

View File

@ -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