#!/bin/sh # postinst script for debathena-dns-config # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `configure' # * `abort-upgrade' # * `abort-remove' `in-favour' # # * `abort-remove' # * `abort-deconfigure' `in-favour' # `removing' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package #DEBHELPER# case "$1" in configure) if hash invoke-rc.d 2>/dev/null; then invoke-rc.d dnsmasq restart || true invoke-rc.d debathena-dns-config restart else /etc/init.d/dnsmasq restart || true /etc/init.d/debathena-dns-config restart fi if ! grep -q '^nameserver' /etc/resolv.conf; then # Don't leave people without a nameserver cat /usr/share/debathena-dns-config/mit-resolv-conf | /sbin/resolvconf -a lo.dns-config fi if [ -x /usr/share/update-notifier/notify-reboot-required ]; then /usr/share/update-notifier/notify-reboot-required fi ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac