From d92c53e70047e8ff92f99b85ce5995e432b43d04 Mon Sep 17 00:00:00 2001 From: Simon Kelley Date: Tue, 20 May 2014 21:00:02 +0100 Subject: Debian: Dynamically create /var/run/dnsmasq when systemd in use too. --- debian/init | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/init b/debian/init index 8eb5535..808c6c1 100644 --- a/debian/init +++ b/debian/init @@ -277,6 +277,12 @@ case "$1" in stop_resolvconf ;; 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. exec $DAEMON --keep-in-foreground --enable-dbus \ -x /var/run/dnsmasq/$NAME.pid \ -- cgit v1.2.1