]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
rpm: use sh compatible redirects
authorJan Engelhardt <jengelh@inai.de>
Fri, 8 Feb 2019 14:35:55 +0000 (15:35 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 8 Feb 2019 16:58:31 +0000 (17:58 +0100)
&> is bash-specific. Switch to something that will work with dash
and pbosh.

src/core/macros.systemd.in

index 9ccad5ebfe8f8ff9a93f6b9658b49b013ee8d6f7..d9e7f573ba2612436711e11397849cf18273419f 100644 (file)
@@ -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}