From: Tollef Fog Heen Date: Wed, 8 Jun 2011 14:23:22 +0000 (+0200) Subject: Fall back to init script based reload if the .service file doesn't support it. X-Git-Tag: 29-1~21 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e505319b868750a276d69964c5abb7b8d2ec6ebf;p=systemd Fall back to init script based reload if the .service file doesn't support it. --- diff --git a/debian/changelog b/debian/changelog index 625f1588..8586fc13 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ systemd (28-1) UNRELEASED; urgency=low * New upstream version. + * Fall back to the init script reload function if a native .service file + doesn't know how to reload. Closes: #628186 -- Tollef Fog Heen Wed, 08 Jun 2011 16:14:31 +0200 diff --git a/debian/init-functions b/debian/init-functions index ab8a04fe..492cad24 100644 --- a/debian/init-functions +++ b/debian/init-functions @@ -35,6 +35,11 @@ if [ -e /sys/fs/cgroup/systemd ] ; then ;; esac ;; + # Some services can't reload through the .service file, + # but can through the init script. + if [ "$(systemctl -p CanReload show $service 2>/dev/null)" = "CanReload=no" ] && "$1" = "reload"; then + _use_systemctl=0 + fi esac else export _SYSTEMCTL_SKIP_REDIRECT="true"