forked from pool/systemd
Accepting request 129288 from Base:System
- Ensure systemd macros never fails (if systemd isn't install) (forwarded request 129285 from fcrozat) OBS-URL: https://build.opensuse.org/request/show/129288 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=109
This commit is contained in:
parent
cd30f49f73
commit
b2b6bd7179
@ -32,10 +32,11 @@ Requires(postun): systemd \
|
|||||||
%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 || : \
|
||||||
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 \
|
||||||
for service in %{?*} ; do \
|
for service in %{?*} ; do \
|
||||||
@ -53,11 +54,12 @@ fi \
|
|||||||
# On install, tell systemd to reload its unit files
|
# On install, tell systemd to reload its unit files
|
||||||
%service_add_post() \
|
%service_add_post() \
|
||||||
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 || : \
|
||||||
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" || : \
|
||||||
fi \
|
fi \
|
||||||
done \
|
done \
|
||||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || : \
|
/bin/systemctl daemon-reload >/dev/null 2>&1 || : \
|
||||||
@ -87,7 +89,7 @@ if [ $FIRST_ARG -ge 1 ]; then \
|
|||||||
else # package uninstall \
|
else # package uninstall \
|
||||||
for service in %{?*} ; do \
|
for service in %{?*} ; do \
|
||||||
sysv_service=${service%.*} \
|
sysv_service=${service%.*} \
|
||||||
rm -f "/var/lib/systemd/migrated/$sysv_service" 2> /dev/null \
|
rm -f "/var/lib/systemd/migrated/$sysv_service" 2> /dev/null || : \
|
||||||
done \
|
done \
|
||||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || : \
|
/bin/systemctl daemon-reload >/dev/null 2>&1 || : \
|
||||||
fi \
|
fi \
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jul 30 11:37:17 UTC 2012 - fcrozat@suse.com
|
||||||
|
|
||||||
|
- Ensure systemd macros never fails (if systemd isn't install)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Jul 23 08:28:15 UTC 2012 - fcrozat@suse.com
|
Mon Jul 23 08:28:15 UTC 2012 - fcrozat@suse.com
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user