]> git.ipfire.org Git - people/ms/dnsmasq.git/commitdiff
Debian: Dynamically create /var/run/dnsmasq when systemd in use too.
authorSimon Kelley <simon@thekelleys.org.uk>
Tue, 20 May 2014 20:00:02 +0000 (21:00 +0100)
committerSimon Kelley <simon@thekelleys.org.uk>
Tue, 20 May 2014 20:00:02 +0000 (21:00 +0100)
debian/init

index 8eb55355a10dcad155ca966ddd39b082decfe2c0..808c6c12a86cf750aaba633f18ccf3e0bbb0e522 100644 (file)
@@ -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 \