diff --git a/systemd-mini.changes b/systemd-mini.changes index b948b00c..1f4f2d70 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -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 diff --git a/systemd-sysv-convert b/systemd-sysv-convert index 8ba3f211..4d98e4f6 100644 --- a/systemd-sysv-convert +++ b/systemd-sysv-convert @@ -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" diff --git a/systemd.changes b/systemd.changes index b948b00c..1f4f2d70 100644 --- a/systemd.changes +++ b/systemd.changes @@ -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