master - systemd: use proper sbindir path
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=d809fbb541a63002214ed1d77914c7a4c7d02c60 Commit: d809fbb541a63002214ed1d77914c7a4c7d02c60 Parent: 3f59969c3fcbff2a3bb177fc07262f1ea569e134 Author: Zdenek Kabelac <[email protected]> AuthorDate: Wed Oct 25 17:06:41 2017 +0200 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Wed Oct 25 22:02:54 2017 +0200
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
--- .../blk_availability_systemd_red_hat.service.in | 2 +- scripts/com.redhat.lvmdbus1.service.in | 2 +- scripts/dm_event_systemd_red_hat.service.in | 2 +- ...2_cluster_activation_systemd_red_hat.service.in | 2 +- scripts/lvm2_clvmd_systemd_red_hat.service.in | 4 ++-- scripts/lvm2_cmirrord_systemd_red_hat.service.in | 2 +- scripts/lvm2_lvmdbusd_systemd_red_hat.service.in | 2 +- scripts/lvm2_lvmetad_systemd_red_hat.service.in | 2 +- scripts/lvm2_lvmlockd_systemd_red_hat.service.in | 2 +- scripts/lvm2_lvmlocking_systemd_red_hat.service.in | 8 ++++---- scripts/lvm2_lvmpolld_systemd_red_hat.service.in | 2 +- scripts/lvm2_monitoring_systemd_red_hat.service.in | 4 ++-- scripts/lvm2_pvscan_systemd_red_hat at .service.in | 4 ++-- 13 files changed, 19 insertions(+), 19 deletions(-)
scripts/blk_availability_systemd_red_hat.service.in +1 -1
@@ -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]
scripts/com.redhat.lvmdbus1.service.in +1 -1
@@ -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
scripts/dm_event_systemd_red_hat.service.in +1 -1
@@ -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
scripts/lvm2_cluster_activation_systemd_red_hat.service.in +1 -1
@@ -9,7 +9,7 @@ Conflicts=shutdown.target [Service] Type=simple RemainAfterExit=yes -EnvironmentFile=- at sysconfdir@/sysconfig/clvmd +EnvironmentFile=- at SYSCONFDIR@/sysconfig/clvmd ExecStart=@systemdutildir@/lvm2-cluster-activation activate ExecStop=@systemdutildir@/lvm2-cluster-activation deactivate
scripts/lvm2_clvmd_systemd_red_hat.service.in +2 -2
@@ -13,8 +13,8 @@ Conflicts=shutdown.target [Service] Type=forking Environment=CLVMD_OPTS=-T30 -EnvironmentFile=- at sysconfdir@/sysconfig/clvmd -ExecStart=@sbindir@/clvmd $CLVMD_OPTS +EnvironmentFile=- at SYSCONFDIR@/sysconfig/clvmd +ExecStart=@USRSBINDIR@/clvmd $CLVMD_OPTS SuccessExitStatus=5 TimeoutStartSec=30 TimeoutStopSec=10
scripts/lvm2_cmirrord_systemd_red_hat.service.in +1 -1
@@ -9,7 +9,7 @@ Conflicts=shutdown.target [Service] Type=forking -ExecStart=@sbindir@/cmirrord +ExecStart=@USRSBINDIR@/cmirrord PIDFile=@CMIRRORD_PIDFILE@ Restart=on-abort
scripts/lvm2_lvmdbusd_systemd_red_hat.service.in +1 -1
@@ -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
scripts/lvm2_lvmetad_systemd_red_hat.service.in +1 -1
@@ -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@
scripts/lvm2_lvmlockd_systemd_red_hat.service.in +1 -1
@@ -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
scripts/lvm2_lvmlocking_systemd_red_hat.service.in +4 -4
@@ -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
scripts/lvm2_lvmpolld_systemd_red_hat.service.in +1 -1
@@ -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@
scripts/lvm2_monitoring_systemd_red_hat.service.in +2 -2
@@ -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]
scripts/lvm2_pvscan_systemd_red_hat at .service.in +2 -2
@@ -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