forked from pool/systemd
- systemd-sysv-convert: make sure that/var/lib/systemd/sysv-convert/database
is always initialized (bsc#982211) If "--save" command was used and the sysv init script wasn't enabled at all, the database file wasn't created at all. This makes the subsequent call to "--apply" fail even though it's a valid scenario. OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=954
This commit is contained in:
parent
b56d5010a6
commit
4f8c3e2552
@ -1,3 +1,14 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Sep 26 14:23:14 UTC 2016 - fbui@suse.com
|
||||||
|
|
||||||
|
- systemd-sysv-convert: make sure that
|
||||||
|
/var/lib/systemd/sysv-convert/database is always initialized (bsc#982211)
|
||||||
|
|
||||||
|
If "--save" command was used and the sysv init script wasn't enabled
|
||||||
|
at all the database file wasn't created at all. This makes the
|
||||||
|
subsequent call to "--apply" fail even though this should not
|
||||||
|
considered as an error.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Sep 26 09:09:27 UTC 2016 - fbui@suse.com
|
Mon Sep 26 09:09:27 UTC 2016 - fbui@suse.com
|
||||||
|
|
||||||
|
@ -118,9 +118,9 @@ case "$1" in
|
|||||||
find_service $service $runlevel
|
find_service $service $runlevel
|
||||||
priority=$?
|
priority=$?
|
||||||
if [ $priority -lt 255 ]; then
|
if [ $priority -lt 255 ]; then
|
||||||
echo "$service $runlevel $priority" >> /var/lib/systemd/sysv-convert/database
|
echo "$service $runlevel $priority"
|
||||||
fi
|
fi
|
||||||
done
|
done >>/var/lib/systemd/sysv-convert/database
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
--show)
|
--show)
|
||||||
@ -158,11 +158,9 @@ case "$1" in
|
|||||||
[ -f "/lib/systemd/system/$service.service" ] && service_file="/lib/systemd/system/$service.service"
|
[ -f "/lib/systemd/system/$service.service" ] && service_file="/lib/systemd/system/$service.service"
|
||||||
[ -f "/usr/lib/systemd/system/$service.service" ] && service_file="/usr/lib/systemd/system/$service.service"
|
[ -f "/usr/lib/systemd/system/$service.service" ] && service_file="/usr/lib/systemd/system/$service.service"
|
||||||
|
|
||||||
if [ -z "${results_runlevel[$service]}" ]; then
|
# If $service is not present in the database,
|
||||||
echo No information found about service $service found. >/dev/stderr
|
# then it simply means that the sysv init
|
||||||
fail=1
|
# service was not enabled at all.
|
||||||
continue
|
|
||||||
fi
|
|
||||||
for runlevel in ${results_runlevel[$service]}; do
|
for runlevel in ${results_runlevel[$service]}; do
|
||||||
echo ln -sf $service_file /etc/systemd/system/runlevel$runlevel.target.wants/$service.service >/dev/stderr
|
echo ln -sf $service_file /etc/systemd/system/runlevel$runlevel.target.wants/$service.service >/dev/stderr
|
||||||
mkdir -p "/etc/systemd/system/runlevel$runlevel.target.wants"
|
mkdir -p "/etc/systemd/system/runlevel$runlevel.target.wants"
|
||||||
|
@ -1,3 +1,14 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Sep 26 14:23:14 UTC 2016 - fbui@suse.com
|
||||||
|
|
||||||
|
- systemd-sysv-convert: make sure that
|
||||||
|
/var/lib/systemd/sysv-convert/database is always initialized (bsc#982211)
|
||||||
|
|
||||||
|
If "--save" command was used and the sysv init script wasn't enabled
|
||||||
|
at all the database file wasn't created at all. This makes the
|
||||||
|
subsequent call to "--apply" fail even though this should not
|
||||||
|
considered as an error.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Sep 26 09:09:27 UTC 2016 - fbui@suse.com
|
Mon Sep 26 09:09:27 UTC 2016 - fbui@suse.com
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user