.
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd-rpm-macros?expand=0&rev=12
This commit is contained in:
parent
301f758bd3
commit
32642573a0
@ -50,13 +50,25 @@ Requires(postun): systemd \
|
|||||||
%_ntpunitsdir /usr/lib/systemd/ntp-units.d
|
%_ntpunitsdir /usr/lib/systemd/ntp-units.d
|
||||||
%_binfmtdir /usr/lib/binfmt.d
|
%_binfmtdir /usr/lib/binfmt.d
|
||||||
|
|
||||||
|
%_restart_check_systemctl \
|
||||||
|
test -f /etc/sysconfig/services && . /etc/sysconfig/services \
|
||||||
|
test "$YAST_IS_RUNNING" = instsys && exit 0 \
|
||||||
|
test "$DISABLE_RESTART_ON_UPDATE" = yes && exit 0 \
|
||||||
|
/usr/bin/systemctl try-restart %{nil}
|
||||||
|
|
||||||
|
%_stop_check_systemctl \
|
||||||
|
test -f /etc/sysconfig/services && . /etc/sysconfig/services \
|
||||||
|
test "$YAST_IS_RUNNING" = instsys && exit 0 \
|
||||||
|
test "$DISABLE_STOP_ON_REMOVAL" = yes && exit 0 \
|
||||||
|
/usr/bin/systemctl stop %{nil}
|
||||||
|
|
||||||
%service_add_pre() \
|
%service_add_pre() \
|
||||||
test -n "$FIRST_ARG" || FIRST_ARG="$1" \
|
test -n "$FIRST_ARG" || FIRST_ARG="$1" \
|
||||||
# disable migration if initial install under systemd \
|
# disable migration if initial install under systemd \
|
||||||
[ -d /var/lib/systemd/migrated ] || mkdir -p /var/lib/systemd/migrated || : \
|
[ -d /var/lib/systemd/migrated ] || mkdir -p /var/lib/systemd/migrated || : \
|
||||||
if [ "$FIRST_ARG" -eq 1 ]; then \
|
if [ "$FIRST_ARG" -eq 1 ]; then \
|
||||||
for service in %{?*} ; do \
|
for service in %{?*} ; do \
|
||||||
sysv_service="${service%.*}" \
|
sysv_service="${service%%.*}" \
|
||||||
touch "/var/lib/systemd/migrated/$sysv_service" || : \
|
touch "/var/lib/systemd/migrated/$sysv_service" || : \
|
||||||
done \
|
done \
|
||||||
else \
|
else \
|
||||||
@ -68,7 +80,7 @@ else \
|
|||||||
done \
|
done \
|
||||||
fi \
|
fi \
|
||||||
for service in %{?*} ; do \
|
for service in %{?*} ; do \
|
||||||
sysv_service="${service%.*}" \
|
sysv_service="${service%%.*}" \
|
||||||
if [ ! -e "/var/lib/systemd/migrated/$sysv_service" ]; then \
|
if [ ! -e "/var/lib/systemd/migrated/$sysv_service" ]; then \
|
||||||
services_to_migrate="$services_to_migrate $sysv_service" \
|
services_to_migrate="$services_to_migrate $sysv_service" \
|
||||||
fi \
|
fi \
|
||||||
@ -84,7 +96,7 @@ fi \
|
|||||||
test -n "$FIRST_ARG" || FIRST_ARG="$1" \
|
test -n "$FIRST_ARG" || FIRST_ARG="$1" \
|
||||||
[ -d /var/lib/systemd/migrated ] || mkdir -p /var/lib/systemd/migrated || : \
|
[ -d /var/lib/systemd/migrated ] || mkdir -p /var/lib/systemd/migrated || : \
|
||||||
for service in %{?*} ; do \
|
for service in %{?*} ; do \
|
||||||
sysv_service="${service%.*}" \
|
sysv_service="${service%%.*}" \
|
||||||
if [ ! -e "/var/lib/systemd/migrated/$sysv_service" ]; then \
|
if [ ! -e "/var/lib/systemd/migrated/$sysv_service" ]; then \
|
||||||
services_to_migrate="$services_to_migrate $sysv_service" \
|
services_to_migrate="$services_to_migrate $sysv_service" \
|
||||||
touch "/var/lib/systemd/migrated/$sysv_service" || : \
|
touch "/var/lib/systemd/migrated/$sysv_service" || : \
|
||||||
@ -121,7 +133,7 @@ test -n "$FIRST_ARG" || FIRST_ARG="$1" \
|
|||||||
if [ "$FIRST_ARG" -eq 0 -a -x /usr/bin/systemctl ]; then \
|
if [ "$FIRST_ARG" -eq 0 -a -x /usr/bin/systemctl ]; then \
|
||||||
# Package removal, not upgrade \
|
# Package removal, not upgrade \
|
||||||
/usr/bin/systemctl --no-reload disable %{?*} || : \
|
/usr/bin/systemctl --no-reload disable %{?*} || : \
|
||||||
/usr/bin/systemctl stop %{?*} || : \
|
( %_stop_check_systemctl %{?*} || : ) \
|
||||||
fi \
|
fi \
|
||||||
%{nil}
|
%{nil}
|
||||||
|
|
||||||
@ -130,10 +142,9 @@ fi \
|
|||||||
test -n "$FIRST_ARG" || FIRST_ARG="$1" \
|
test -n "$FIRST_ARG" || FIRST_ARG="$1" \
|
||||||
if [ "$FIRST_ARG" -ge 1 ]; then \
|
if [ "$FIRST_ARG" -ge 1 ]; then \
|
||||||
# Package upgrade, not uninstall \
|
# Package upgrade, not uninstall \
|
||||||
if test "$YAST_IS_RUNNING" != "instsys" && \
|
if [ -x /usr/bin/systemctl ]; then \
|
||||||
test "$DISABLE_RESTART_ON_UPDATE" != yes -a -x /usr/bin/systemctl; then \
|
|
||||||
/usr/bin/systemctl daemon-reload || : \
|
/usr/bin/systemctl daemon-reload || : \
|
||||||
/usr/bin/systemctl try-restart %{?*} || : \
|
( %_restart_check_systemctl %{?*} || : ) \
|
||||||
fi \
|
fi \
|
||||||
else # package uninstall \
|
else # package uninstall \
|
||||||
for service in %{?*} ; do \
|
for service in %{?*} ; do \
|
||||||
@ -150,7 +161,7 @@ fi \
|
|||||||
if [ "$1" -eq 0 -a -x /usr/bin/systemctl ]; then \
|
if [ "$1" -eq 0 -a -x /usr/bin/systemctl ]; then \
|
||||||
# Package removal, not upgrade \
|
# Package removal, not upgrade \
|
||||||
/usr/bin/systemctl --no-reload disable %{?*} || : \
|
/usr/bin/systemctl --no-reload disable %{?*} || : \
|
||||||
/usr/bin/systemctl stop %{?*} || : \
|
( %_stop_check_systemctl %{?*} || : ) \
|
||||||
fi \
|
fi \
|
||||||
%{nil}
|
%{nil}
|
||||||
|
|
||||||
@ -160,7 +171,7 @@ fi \
|
|||||||
if [ "$1" -eq 0 -a -x /usr/bin/systemctl ]; then \
|
if [ "$1" -eq 0 -a -x /usr/bin/systemctl ]; then \
|
||||||
# Package removal, not upgrade \
|
# Package removal, not upgrade \
|
||||||
/usr/bin/systemctl --no-reload disable %{?*} || : \
|
/usr/bin/systemctl --no-reload disable %{?*} || : \
|
||||||
/usr/bin/systemctl stop %{?*} || : \
|
( %_stop_check_systemctl %{?*} || : ) \
|
||||||
fi \
|
fi \
|
||||||
%{nil}
|
%{nil}
|
||||||
|
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Nov 20 16:53:23 UTC 2015 - werner@suse.de
|
||||||
|
|
||||||
|
- Support of DISABLE_STOP_ON_REMOVAL and DISABLE_RESTART_ON_UPDATE
|
||||||
|
from /etc/sysconfig/service (bsc#955996)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Sep 18 15:27:04 CEST 2015 - sbrabec@suse.com
|
Fri Sep 18 15:27:04 CEST 2015 - sbrabec@suse.com
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user