mirror of
https://github.com/systemd/systemd.git
synced 2024-10-30 14:55:37 +03:00
rpm: use %_bindir not @bindir@
We were using both in various places. To keep things simple, let rpm do the substitution.
This commit is contained in:
parent
54e6c7624f
commit
d0f8006993
@ -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}
|
||||
|
Loading…
Reference in New Issue
Block a user