From 1913a3fbb8bc59439df3ca1f525318705a880fac Mon Sep 17 00:00:00 2001 From: Tollef Fog Heen Date: Sun, 13 Feb 2011 16:37:22 +0100 Subject: [PATCH] Skip masked services in lsb-base-logging.sh Silently skip masked services in lsb-base-logging.sh instead of failing. Initial implementation by Michael Biebl. Closes: #612551 --- debian/changelog | 2 ++ debian/lsb-base-logging.sh | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/debian/changelog b/debian/changelog index f036ab9f..f16a68df 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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). diff --git a/debian/lsb-base-logging.sh b/debian/lsb-base-logging.sh index cfd04ccf..2998bdbb 100644 --- a/debian/lsb-base-logging.sh +++ b/debian/lsb-base-logging.sh @@ -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=$? -- 2.39.5