* Make /etc/exports a conffile. (closes: #224557)
[nfs-utils.git] / debian / nfs-kernel-server.postinst
1 #!/bin/sh -e
2
3 #DEBHELPER#
4
5 case "$1" in
6     configure)
7         for f in /var/lib/nfs/etab  \
8                  /var/lib/nfs/rmtab \
9                  /var/lib/nfs/xtab; do
10             [ -e $f ] || touch $f
11         done
12
13         update-rc.d nfs-kernel-server defaults 20 80 >/dev/null
14
15         # Remove obsolete debconf questions
16         if [ -e /usr/share/debconf/confmodule ]; then
17             . /usr/share/debconf/confmodule
18             db_unregister nfs-kernel-server/sync-default || true
19             db_unregister nfs-kernel-server/tcpwrappers-mountd || true
20             db_stop
21         fi
22         ;;
23 esac
24
25 act="restart"
26 [ "$1:$2" = "configure:" ] && act="start"
27 invoke-rc.d nfs-kernel-server $act