5
id pdnsd > /dev/null 2>&1 || adduser --system --ingroup proxy --home /var/cache/pdnsd --no-create-home --gecos pdnsd pdnsd || true
7
if [ "$1" = "configure" -a -n "$2" ] && dpkg --compare-versions "$2" lt "1.1" ; then
8
if [ -f /var/cache/pdnsd/pdnsd.cache ]; then
9
echo -n "Deleting old pdnsd cache... "
10
rm -f /var/cache/pdnsd/pdnsd.cache
15
if [ ! -f /var/cache/pdnsd/pdnsd.cache ];then
16
dd if=/dev/zero of=/var/cache/pdnsd/pdnsd.cache bs=1 count=4 2> /dev/null
19
chown -R pdnsd:proxy /var/cache/pdnsd
4
sed -i -e "s/^\s*${1}\s*=\s*[^#]*/${1}=${2}/" /etc/default/pdnsd
7
if test "$1" = "configure"; then
8
. /usr/share/debconf/confmodule
12
db_get pdnsd/conf || true
15
default_set_var START_DAEMON yes
16
default_set_var AUTO_MODE resolvconf
19
default_set_var START_DAEMON yes
20
default_set_var AUTO_MODE recurse
23
default_set_var AUTO_MODE ""
29
# ensure rcS.d link is created, can be removed in lenny+1
30
if dpkg --compare-versions "$2" lt "1.2.5par-0"; then
31
update-rc.d -f pdnsd remove >/dev/null 2>/dev/null || true
34
if ! getent passwd pdnsd > /dev/null; then
35
adduser --quiet --system --ingroup proxy --no-create-home --home /var/cache/pdnsd pdnsd
38
if [ ! -f /var/cache/pdnsd/pdnsd.cache ];then
39
dd if=/dev/zero of=/var/cache/pdnsd/pdnsd.cache bs=1 count=4 2> /dev/null
42
chown -R pdnsd:proxy /var/cache/pdnsd