Really fix package initial installation when PID1 is systemd (Closes: #747863)
This commit is contained in:
parent
64e656ba48
commit
5dc71af109
6 changed files with 53 additions and 2 deletions
13
debian/nut-server.postinst
vendored
13
debian/nut-server.postinst
vendored
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue