SHA256
1
0
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:
Franck Bui 2016-09-27 09:44:14 +00:00 committed by Git OBS Bridge
parent 1a335a6a0c
commit 6b50ea651e
3 changed files with 27 additions and 7 deletions

View File

@ -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

View File

@ -118,9 +118,9 @@ case "$1" in
find_service $service $runlevel
priority=$?
if [ $priority -lt 255 ]; then
echo "$service $runlevel $priority" >> /var/lib/systemd/sysv-convert/database
echo "$service $runlevel $priority"
fi
done
done >>/var/lib/systemd/sysv-convert/database
done
;;
--show)
@ -158,11 +158,9 @@ case "$1" in
[ -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"
if [ -z "${results_runlevel[$service]}" ]; then
echo No information found about service $service found. >/dev/stderr
fail=1
continue
fi
# If $service is not present in the database,
# then it simply means that the sysv init
# service was not enabled at all.
for runlevel in ${results_runlevel[$service]}; do
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"

View File

@ -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