Really fix package initial installation when PID1 is systemd (Closes: #747863)

This commit is contained in:
Laurent Bigonville 2015-03-15 11:14:01 +01:00
parent 64e656ba48
commit 5dc71af109
6 changed files with 53 additions and 2 deletions

View file

@ -1,5 +1,18 @@
#!/bin/sh -e
handle_start_failure () {
# The nut server part (upsd) must run in all cases except when MODE in
# /etc/nut/nut.conf is set to "none", not set at all or if the machine is a
# client.
[ -r /etc/nut/nut.conf ] && . /etc/nut/nut.conf
if [ -d /run/systemd/system ] \
&& [ "$MODE" = "none" -o "$MODE" = "netclient" -o -z "$MODE" ]; then
return 0
else
return 1
fi
}
case "$1" in
configure)