summaryrefslogtreecommitdiffstats
path: root/debian/nfs-common.postinst
blob: 5af4731e87791e704755457a4882f7731bcfb80c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/sh -e

#DEBHELPER#

case "$1" in
    configure)
	if [ "$2" != "" -a "$2" != "<unknown>" ] \
	   && dpkg --compare-versions "$2" lt "1:1.0-3" \
	   || ( dpkg --compare-versions "$2" ge "1:1.0.1" \
		&& dpkg --compare-versions "$2" lt "1:1.0.2-1" )
	then
	    update-rc.d -f nfs-common remove >/dev/null 2>&1 || true
	fi
	update-rc.d nfs-common defaults 21 79 >/dev/null

	# Remove obsolete debconf questions
	if [ -e /usr/share/debconf/confmodule ]; then
	    . /usr/share/debconf/confmodule
	    db_unregister nfs-common/tcpwrappers-statd || true
	    db_stop
	fi
	;;
esac

act="restart"
[ "$1:$2" = "configure:" ] && act="start"
invoke-rc.d nfs-common $act