Debian: Dynamically create /var/run/dnsmasq when systemd in use too.

This commit is contained in:
Simon Kelley
2014-05-20 21:00:02 +01:00
parent a754e1d7b2
commit d92c53e700

6
debian/init vendored
View File

@@ -277,6 +277,12 @@ case "$1" in
stop_resolvconf stop_resolvconf
;; ;;
systemd-exec) systemd-exec)
# /var/run may be volatile, so we need to ensure that
# /var/run/dnsmasq exists here as well as in postinst
if [ ! -d /var/run/dnsmasq ]; then
mkdir /var/run/dnsmasq || return 2
chown dnsmasq:nogroup /var/run/dnsmasq || return 2
fi
# Enable DBus by default because we use DBus activation with systemd. # Enable DBus by default because we use DBus activation with systemd.
exec $DAEMON --keep-in-foreground --enable-dbus \ exec $DAEMON --keep-in-foreground --enable-dbus \
-x /var/run/dnsmasq/$NAME.pid \ -x /var/run/dnsmasq/$NAME.pid \