diff --git a/debian/patches/debian/Add-run-initctl-support-to-SysV-compat-tools.patch b/debian/patches/debian/Add-run-initctl-support-to-SysV-compat-tools.patch index 4234eb808..381a69f2e 100644 --- a/debian/patches/debian/Add-run-initctl-support-to-SysV-compat-tools.patch +++ b/debian/patches/debian/Add-run-initctl-support-to-SysV-compat-tools.patch @@ -11,7 +11,7 @@ as PID 1. 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c -index 6a0ed79..89e54f7 100644 +index db64840..f058a72 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -7659,17 +7659,22 @@ static int talk_initctl(void) { diff --git a/debian/patches/series b/debian/patches/series index ff95c3d21..21c326051 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -12,6 +12,7 @@ seccomp-also-detect-if-seccomp-filtering-is-enabled.patch nspawn-detect-SECCOMP-availability-skip-audit-filter-if-u.patch shared-recognize-DNS-names-with-more-than-one-trailing-do.patch networkd-limit-the-number-of-routes-to-the-kernel-limit-4.patch +systemctl-consider-service-running-only-when-it-is-in-act.patch debian/Use-Debian-specific-config-files.patch debian/don-t-try-to-start-autovt-units-when-not-running-wit.patch debian/Make-logind-hostnamed-localed-timedated-D-Bus-activa.patch diff --git a/debian/patches/systemctl-consider-service-running-only-when-it-is-in-act.patch b/debian/patches/systemctl-consider-service-running-only-when-it-is-in-act.patch new file mode 100644 index 000000000..fa1a7d8a7 --- /dev/null +++ b/debian/patches/systemctl-consider-service-running-only-when-it-is-in-act.patch @@ -0,0 +1,26 @@ +From: =?utf-8?q?Luk=C3=A1=C5=A1_Nykr=C3=BDn?= +Date: Wed, 3 Aug 2016 17:08:37 +0200 +Subject: systemctl: consider service running only when it is in active or + reloading state (#3874) + +Otherwise for example services that are failing on start and have Restart=on-failure +and bigger RestartSec systemctl status will return 0. + +Fixes: #3864 +--- + src/systemctl/systemctl.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c +index 6a0ed79..db64840 100644 +--- a/src/systemctl/systemctl.c ++++ b/src/systemctl/systemctl.c +@@ -4767,7 +4767,7 @@ static int show_one( + else if (streq(verb, "status")) { + print_status_info(bus, &info, ellipsized); + +- if (info.active_state && STR_IN_SET(info.active_state, "inactive", "failed")) ++ if (info.active_state && !STR_IN_SET(info.active_state, "active", "reloading")) + r = EXIT_PROGRAM_NOT_RUNNING; + else + r = EXIT_PROGRAM_RUNNING_OR_SERVICE_OK;