summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Kelley <simon@thekelleys.org.uk>2014-05-20 21:00:02 +0100
committerSimon Kelley <simon@thekelleys.org.uk>2014-05-20 21:00:02 +0100
commitd92c53e70047e8ff92f99b85ce5995e432b43d04 (patch)
treea98f359f465b9aeeed66329cb559e8e454807a51
parenta754e1d7b240c63b0ce346c5eae3a599122bbfbc (diff)
downloaddnsmasq-d92c53e70047e8ff92f99b85ce5995e432b43d04.tar.gz
Debian: Dynamically create /var/run/dnsmasq when systemd in use too.
-rw-r--r--debian/init6
1 files changed, 6 insertions, 0 deletions
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 \