Dnsmasq: update to 2.66TEST16
[tomato.git] / release / src / router / dnsmasq / debian / dnsmasq-base.postinst
blob4f025ca2c9b75d3bb873f6e00165580a17e24dc6
1 #!/bin/sh
2 set -e
4 # Create the dnsmasq user in dnsmasq-base, so that Dbus doesn't complain.
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
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