]> git.ipfire.org Git - people/ms/dnsmasq.git/blob - debian/dnsmasq-base.postinst
Fix new poll() code for helper pipe. Removed CPU-spin.
[people/ms/dnsmasq.git] / debian / dnsmasq-base.postinst
1 #!/bin/sh
2 set -e
3
4 # Create the dnsmasq user in dnsmasq-base, so that Dbus doesn't complain.
5
6 # create a user to run as (code stolen from dovecot-common)
7 if [ "$1" = "configure" ]; then
8 if [ -z "`id -u dnsmasq 2> /dev/null`" ]; then
9 adduser --system --home /var/lib/misc --gecos "dnsmasq" \
10 --no-create-home --disabled-password \
11 --quiet dnsmasq || true
12 fi
13
14 # Make the directory where we keep the pid file - this
15 # has to be owned by "dnsmasq" so that the file can be unlinked.
16 # This is only actually used by the dnsmasq binary package, not
17 # dnsmasq-base, but it's much easier to create it here so that
18 # we don't have synchronisation issues with the creation of the
19 # dnsmasq user.
20 if [ ! -d /var/run/dnsmasq ]; then
21 mkdir /var/run/dnsmasq
22 chown dnsmasq:nogroup /var/run/dnsmasq
23 fi
24 fi