SHA256
6
0
forked from pool/rpm
2016-04-21 13:24:43 +00:00
committed by Git OBS Bridge
parent ee30576c40
commit 3a3fbf43f6
7 changed files with 69 additions and 40 deletions

View File

@@ -21,36 +21,9 @@
/usr/lib/rpm/brp-suse \
%{nil}
# macro: %restart_on_update()
# Used to restart a service in postun section, if we are
# not running from YaST2 in instsys on update.
%restart_on_update() \
test -n "$FIRST_ARG" || FIRST_ARG=$1 \
if test "$FIRST_ARG" -ge 1 ; then \
test -f /etc/sysconfig/services && . /etc/sysconfig/services \
if test "$YAST_IS_RUNNING" != "instsys" -a "$DISABLE_RESTART_ON_UPDATE" != yes ; then \
test -x /bin/systemctl && /bin/systemctl daemon-reload >/dev/null 2>&1 || : \
for service in %{?*} ; do \
test -x /bin/systemctl && /bin/systemctl try-restart $service >/dev/null 2>&1 || : \
done \
fi \
fi \
%nil
%restart_on_update() %{service_del_postun %{?*}}
%stop_on_removal() %{service_del_preun %{?*}}
# macro: %stop_on_removal()
# Used to stop a service in preun section, if we are
# not running from YaST2 in instsys on removal of this package.
%stop_on_removal() \
test -n "$FIRST_ARG" || FIRST_ARG=$1 \
if test "$FIRST_ARG" = "0" ; then \
test -f /etc/sysconfig/services && . /etc/sysconfig/services \
if test "$YAST_IS_RUNNING" != "instsys" -a "$DISABLE_STOP_ON_REMOVAL" != yes ; then \
for service in %{?*} ; do \
test -x /bin/systemctl && /bin/systemctl stop $service >/dev/null 2>&1 || : \
done \
fi \
fi \
%nil
# macro: %configure_kernel_source
#
#