#!/bin/sh
set -e

update-rc.d dnsmasq defaults 15 >/dev/null

if [ "$1" = "configure" ]; then
	if [ -d /usr/doc -a ! -e /usr/doc/dnsmasq -a -d /usr/share/doc/dnsmasq ]; then
		ln -sf ../share/doc/dnsmasq /usr/doc/dnsmasq
	fi

# remove old section 1 man pages - it's in 8 now
        if [ -e /usr/share/man/man1/dnsmasq.1.gz ]; then
                rm -f /usr/share/man/man1/dnsmasq.1.gz
        fi

        /etc/init.d/dnsmasq start

fi
