mirror of
https://github.com/systemd/systemd.git
synced 2024-12-13 04:03:35 +08:00
rpm: use sh compatible redirects
&> is bash-specific. Switch to something that will work with dash and pbosh.
This commit is contained in:
parent
1cae151d8e
commit
a6fe3b4894
@ -43,7 +43,7 @@ OrderWithRequires(postun): systemd \
|
||||
%systemd_post() \
|
||||
if [ $1 -eq 1 ] ; then \
|
||||
# Initial installation \
|
||||
systemctl --no-reload preset %{?*} &>/dev/null || : \
|
||||
systemctl --no-reload preset %{?*} >/dev/null 2>&1 || : \
|
||||
fi \
|
||||
%{nil}
|
||||
|
||||
@ -52,14 +52,14 @@ fi \
|
||||
%systemd_preun() \
|
||||
if [ $1 -eq 0 ] ; then \
|
||||
# Package removal, not upgrade \
|
||||
systemctl --no-reload disable --now %{?*} &>/dev/null || : \
|
||||
systemctl --no-reload disable --now %{?*} >/dev/null 2>&1 || : \
|
||||
fi \
|
||||
%{nil}
|
||||
|
||||
%systemd_user_preun() \
|
||||
if [ $1 -eq 0 ] ; then \
|
||||
# Package removal, not upgrade \
|
||||
systemctl --global disable %{?*} &>/dev/null || : \
|
||||
systemctl --global disable %{?*} >/dev/null 2>&1 || : \
|
||||
fi \
|
||||
%{nil}
|
||||
|
||||
@ -70,7 +70,7 @@ fi \
|
||||
%systemd_postun_with_restart() \
|
||||
if [ $1 -ge 1 ] ; then \
|
||||
# Package upgrade, not uninstall \
|
||||
systemctl try-restart %{?*} &>/dev/null || : \
|
||||
systemctl try-restart %{?*} >/dev/null 2>&1 || : \
|
||||
fi \
|
||||
%{nil}
|
||||
|
||||
@ -84,16 +84,16 @@ fi \
|
||||
|
||||
# Deprecated. Use %tmpfiles_create_package instead
|
||||
%tmpfiles_create() \
|
||||
systemd-tmpfiles --create %{?*} &>/dev/null || : \
|
||||
systemd-tmpfiles --create %{?*} >/dev/null 2>&1 || : \
|
||||
%{nil}
|
||||
|
||||
# Deprecated. Use %sysusers_create_package instead
|
||||
%sysusers_create() \
|
||||
systemd-sysusers %{?*} &>/dev/null || : \
|
||||
systemd-sysusers %{?*} >/dev/null 2>&1 || : \
|
||||
%{nil}
|
||||
|
||||
%sysusers_create_inline() \
|
||||
systemd-sysusers - <<SYSTEMD_INLINE_EOF &>/dev/null || : \
|
||||
systemd-sysusers - <<SYSTEMD_INLINE_EOF >/dev/null 2>&1 || : \
|
||||
%{?*} \
|
||||
SYSTEMD_INLINE_EOF \
|
||||
%{nil}
|
||||
@ -112,7 +112,7 @@ SYSTEMD_INLINE_EOF \
|
||||
# %files
|
||||
# %{_sysusersdir}/%{name}.conf
|
||||
%sysusers_create_package() \
|
||||
systemd-sysusers --replace=%_sysusersdir/%1.conf - <<SYSTEMD_INLINE_EOF &>/dev/null || : \
|
||||
systemd-sysusers --replace=%_sysusersdir/%1.conf - <<SYSTEMD_INLINE_EOF >/dev/null 2>&1 || : \
|
||||
%(cat %2) \
|
||||
SYSTEMD_INLINE_EOF \
|
||||
%{nil}
|
||||
@ -131,15 +131,15 @@ SYSTEMD_INLINE_EOF \
|
||||
# %files
|
||||
# %{_tmpfilesdir}/%{name}.conf
|
||||
%tmpfiles_create_package() \
|
||||
systemd-tmpfiles --replace=%_tmpfilesdir/%1.conf --create - <<SYSTEMD_INLINE_EOF &>/dev/null || : \
|
||||
systemd-tmpfiles --replace=%_tmpfilesdir/%1.conf --create - <<SYSTEMD_INLINE_EOF >/dev/null 2>&1 || : \
|
||||
%(cat %2) \
|
||||
SYSTEMD_INLINE_EOF \
|
||||
%{nil}
|
||||
|
||||
%sysctl_apply() \
|
||||
@rootlibexecdir@/systemd-sysctl %{?*} &>/dev/null || : \
|
||||
@rootlibexecdir@/systemd-sysctl %{?*} >/dev/null 2>&1 || : \
|
||||
%{nil}
|
||||
|
||||
%binfmt_apply() \
|
||||
@rootlibexecdir@/systemd-binfmt %{?*} &>/dev/null || : \
|
||||
@rootlibexecdir@/systemd-binfmt %{?*} >/dev/null 2>&1 || : \
|
||||
%{nil}
|
||||
|
Loading…
Reference in New Issue
Block a user