change
OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=367
This commit is contained in:
@@ -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
|
||||
#
|
||||
#
|
||||
|
Reference in New Issue
Block a user