]> err.no Git - systemd/commitdiff
Skip masked services in lsb-base-logging.sh
authorTollef Fog Heen <tfheen@err.no>
Sun, 13 Feb 2011 15:37:22 +0000 (16:37 +0100)
committerTollef Fog Heen <tfheen@err.no>
Sun, 13 Feb 2011 15:37:22 +0000 (16:37 +0100)
Silently skip masked services in lsb-base-logging.sh instead of
failing.  Initial implementation by Michael Biebl.  Closes: #612551

debian/changelog
debian/lsb-base-logging.sh

index f036ab9f195930d2980324d6b04c682bb809b997..f16a68dfbcc109b278f5f8cb7acce9715c5e51e8 100644 (file)
@@ -3,6 +3,8 @@ systemd (17-1) UNRELEASED; urgency=low
   [ Tollef Fog Heen ]
   * New upstream release
   * Clarify ifupdown instructions in README.Debian somewhat.
+  * Silently skip masked services in lsb-base-logging.sh instead of
+    failing.  Initial implementation by Michael Biebl.  Closes: #612551
 
   [ Michael Biebl ]
   * Bump build dependency on valac to (>= 0.10.3).
index cfd04ccf107f9c5fe1010b19484155a1934ff6d5..2998bdbb37df219e73e149b4b45ee400a9870a30 100644 (file)
@@ -55,6 +55,13 @@ systemctl_redirect () {
        esac
 
        service="${prog%.sh}.service"
+
+       # Don't try to run masked services. Don't check for errors, if
+       # this errors, we'll just call systemctl and possibly explode
+       # there.
+       state=$(systemctl -p LoadState show $service 2>/dev/null)
+       [ "$state" = "LoadState=masked" ] && return 0
+
        [ "$command" = status ] || log_daemon_msg "$s" "$service"
        /bin/systemctl $command "$service"
        rc=$?