summaryrefslogtreecommitdiff
path: root/src/rpm
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-05-16 16:45:51 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2021-05-19 10:25:26 +0900
commitd0f8006993deb976071ccdef823c61bdd1b9bbfe (patch)
tree4dbc4221889d26cc3b14891bc42011596fc61ff7 /src/rpm
parent54e6c7624f86330036a5bffd20a9400827d90c58 (diff)
downloadsystemd-d0f8006993deb976071ccdef823c61bdd1b9bbfe.tar.gz
rpm: use %_bindir not @bindir@
We were using both in various places. To keep things simple, let rpm do the substitution.
Diffstat (limited to 'src/rpm')
-rw-r--r--src/rpm/macros.systemd.in24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/rpm/macros.systemd.in b/src/rpm/macros.systemd.in
index 244c274d29..0d27c1703a 100644
--- a/src/rpm/macros.systemd.in
+++ b/src/rpm/macros.systemd.in
@@ -46,9 +46,9 @@ OrderWithRequires(postun): systemd \
%systemd_post() \
%{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# systemd_post}} \
-if [ $1 -eq 1 ] && [ -x @bindir@/systemctl ]; then \
+if [ $1 -eq 1 ] && [ -x %{_bindir}/systemctl ]; then \
# Initial installation \
- @bindir@/systemctl --no-reload preset %{?*} || : \
+ %{_bindir}/systemctl --no-reload preset %{?*} || : \
fi \
%{nil}
@@ -56,21 +56,21 @@ fi \
%systemd_preun() \
%{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# systemd_preun}} \
-if [ $1 -eq 0 ] && [ -x @bindir@/systemctl ]; then \
+if [ $1 -eq 0 ] && [ -x %{_bindir}/systemctl ]; then \
# Package removal, not upgrade \
if [ -d /run/systemd/system ]; then \
- @bindir@/systemctl --no-reload disable --now %{?*} || : \
+ %{_bindir}/systemctl --no-reload disable --now %{?*} || : \
else \
- @bindir@/systemctl --no-reload disable %{?*} || : \
+ %{_bindir}/systemctl --no-reload disable %{?*} || : \
fi \
fi \
%{nil}
%systemd_user_preun() \
%{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# systemd_user_preun}} \
-if [ $1 -eq 0 ] && [ -x @bindir@/systemctl ]; then \
+if [ $1 -eq 0 ] && [ -x %{_bindir}/systemctl ]; then \
# Package removal, not upgrade \
- @bindir@/systemctl --global disable %{?*} || : \
+ %{_bindir}/systemctl --global disable %{?*} || : \
fi \
%{nil}
@@ -84,10 +84,10 @@ fi \
%systemd_postun_with_restart() \
%{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# systemd_postun_with_restart}} \
-if [ $1 -ge 1 ] && [ -x @bindir@/systemctl ]; then \
+if [ $1 -ge 1 ] && [ -x %{_bindir}/systemctl ]; then \
# Package upgrade, not uninstall \
for unit in %{?*}; do \
- @bindir@/systemctl set-property $unit Markers=+needs-restart || : \
+ %{_bindir}/systemctl set-property $unit Markers=+needs-restart || : \
done \
fi \
%{nil}
@@ -105,17 +105,17 @@ fi \
# Deprecated. Use %tmpfiles_create_package instead
%tmpfiles_create() \
%{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# tmpfiles_create}} \
-[ -x @bindir@/systemd-tmpfiles ] && @bindir@/systemd-tmpfiles --create %{?*} || : \
+[ -x %{_bindir}/systemd-tmpfiles ] && %{_bindir}/systemd-tmpfiles --create %{?*} || : \
%{nil}
# Deprecated. Use %sysusers_create_package instead
%sysusers_create() \
%{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# sysusers_create}} \
-[ -x @bindir@/systemd-sysusers ] && @bindir@/systemd-sysusers %{?*} || : \
+[ -x %{_bindir}/systemd-sysusers ] && %{_bindir}/systemd-sysusers %{?*} || : \
%{nil}
%sysusers_create_inline() \
-[ -x @bindir@/systemd-sysusers ] && @bindir@/systemd-sysusers - <<SYSTEMD_INLINE_EOF || : \
+[ -x %{_bindir}/systemd-sysusers ] && %{_bindir}/systemd-sysusers - <<SYSTEMD_INLINE_EOF || : \
%{?*} \
SYSTEMD_INLINE_EOF\
%{nil}