|
Lines 51-67
Link Here
|
| 51 |
%_binfmtdir /usr/lib/binfmt.d |
51 |
%_binfmtdir /usr/lib/binfmt.d |
| 52 |
|
52 |
|
| 53 |
%_restart_check_systemctl \ |
53 |
%_restart_check_systemctl \ |
| 54 |
test "$DISABLE_RESTART_ON_UPDATE" = yes && exit 0 \ |
54 |
test "$YAST_IS_RUNNING" = instsys && exit 0 \ |
| 55 |
test -f /etc/sysconfig/services && . /etc/sysconfig/services \ |
55 |
%if 0%{!?2:1} \ |
|
|
56 |
test "$DISABLE_RESTART_ON_UPDATE" = yes -o \ |
| 57 |
"$DISABLE_RESTART_ON_UPDATE" = 1 && exit 0 \ |
| 58 |
%endif \ |
| 59 |
%if "%{?2}%{!?2:default}" == "default" \ |
| 60 |
if [ -f /etc/sysconfig/services ]; then \ |
| 61 |
. /etc/sysconfig/services \ |
| 62 |
test "$DISABLE_RESTART_ON_UPDATE" = yes -o \ |
| 63 |
"$DISABLE_RESTART_ON_UPDATE" = 1 && exit 0 \ |
| 64 |
fi \ |
| 65 |
%else \ |
| 66 |
%if "%{2}" == "no_restart" \ |
| 67 |
exit 0 ;; \ |
| 68 |
%endif \ |
| 69 |
%endif \ |
| 70 |
/usr/bin/systemctl try-restart %{1} %{nil} |
| 71 |
|
| 72 |
%_stop_check_systemctl \ |
| 56 |
test "$YAST_IS_RUNNING" = instsys && exit 0 \ |
73 |
test "$YAST_IS_RUNNING" = instsys && exit 0 \ |
| 57 |
test "$DISABLE_RESTART_ON_UPDATE" = yes && exit 0 \ |
74 |
%if 0%{!?2:1} \ |
| 58 |
/usr/bin/systemctl try-restart %{nil} |
75 |
test "$DISABLE_STOP_ON_REMOVAL" = yes -o \ |
| 59 |
|
76 |
"$DISABLE_STOP_ON_REMOVAL" = 1 && exit 0 \ |
| 60 |
%_stop_check_systemctl \ |
77 |
%endif \ |
| 61 |
test "$DISABLE_STOP_ON_REMOVAL" = yes && exit 0 \ |
78 |
%if "%{?2}%{!?2:default}" == "default" \ |
| 62 |
test -f /etc/sysconfig/services && . /etc/sysconfig/services \ |
79 |
if [ -f /etc/sysconfig/services ]; then \ |
| 63 |
test "$YAST_IS_RUNNING" = instsys && exit 0 \ |
80 |
. /etc/sysconfig/services \ |
| 64 |
test "$DISABLE_STOP_ON_REMOVAL" = yes && exit 0 \ |
81 |
test "$DISABLE_STOP_ON_REMOVAL" = yes -o \ |
|
|
82 |
"$DISABLE_STOP_ON_REMOVAL" = 1 && exit 0 \ |
| 83 |
fi \ |
| 84 |
%else \ |
| 85 |
%if "%{2}" == "no_stop" \ |
| 86 |
exit 0 ;; \ |
| 87 |
%endif \ |
| 88 |
%endif \ |
| 65 |
/usr/bin/systemctl stop %{nil} |
89 |
/usr/bin/systemctl stop %{nil} |
| 66 |
|
90 |
|
| 67 |
%service_add_pre() \ |
91 |
%service_add_pre() \ |
|
Lines 135-141
Link Here
|
| 135 |
if [ "$FIRST_ARG" -eq 0 -a -x /usr/bin/systemctl ]; then \ |
159 |
if [ "$FIRST_ARG" -eq 0 -a -x /usr/bin/systemctl ]; then \ |
| 136 |
# Package removal, not upgrade \ |
160 |
# Package removal, not upgrade \ |
| 137 |
/usr/bin/systemctl --no-reload disable %{?*} || : \ |
161 |
/usr/bin/systemctl --no-reload disable %{?*} || : \ |
| 138 |
( %_stop_check_systemctl %{?*} || : ) \ |
162 |
( %_stop_check_systemctl || : ) \ |
| 139 |
fi \ |
163 |
fi \ |
| 140 |
%{nil} |
164 |
%{nil} |
| 141 |
|
165 |
|
|
Lines 146-152
Link Here
|
| 146 |
# Package upgrade, not uninstall \ |
170 |
# Package upgrade, not uninstall \ |
| 147 |
if [ -x /usr/bin/systemctl ]; then \ |
171 |
if [ -x /usr/bin/systemctl ]; then \ |
| 148 |
/usr/bin/systemctl daemon-reload || : \ |
172 |
/usr/bin/systemctl daemon-reload || : \ |
| 149 |
( %_restart_check_systemctl %{?*} || : ) \ |
173 |
( %_restart_check_systemctl || : ) \ |
| 150 |
fi \ |
174 |
fi \ |
| 151 |
else # package uninstall \ |
175 |
else # package uninstall \ |
| 152 |
for service in %{?*} ; do \ |
176 |
for service in %{?*} ; do \ |
|
Lines 163-169
Link Here
|
| 163 |
if [ "$1" -eq 0 -a -x /usr/bin/systemctl ]; then \ |
187 |
if [ "$1" -eq 0 -a -x /usr/bin/systemctl ]; then \ |
| 164 |
# Package removal, not upgrade \ |
188 |
# Package removal, not upgrade \ |
| 165 |
/usr/bin/systemctl --no-reload disable %{?*} || : \ |
189 |
/usr/bin/systemctl --no-reload disable %{?*} || : \ |
| 166 |
( %_stop_check_systemctl %{?*} || : ) \ |
190 |
( %_stop_check_systemctl || : ) \ |
| 167 |
fi \ |
191 |
fi \ |
| 168 |
%{nil} |
192 |
%{nil} |
| 169 |
|
193 |
|
|
Lines 173-179
Link Here
|
| 173 |
if [ "$1" -eq 0 -a -x /usr/bin/systemctl ]; then \ |
197 |
if [ "$1" -eq 0 -a -x /usr/bin/systemctl ]; then \ |
| 174 |
# Package removal, not upgrade \ |
198 |
# Package removal, not upgrade \ |
| 175 |
/usr/bin/systemctl --no-reload disable %{?*} || : \ |
199 |
/usr/bin/systemctl --no-reload disable %{?*} || : \ |
| 176 |
( %_stop_check_systemctl %{?*} || : ) \ |
200 |
( %_stop_check_systemctl || : ) \ |
| 177 |
fi \ |
201 |
fi \ |
| 178 |
%{nil} |
202 |
%{nil} |
| 179 |
|
203 |
|