Imported Debian patch 1.0.8-3
[nfs-utils.git] / debian / nfs-kernel-server.postinst
1 #!/bin/sh -e
2
3 #DEBHELPER#
4
5 case "$1" in
6     configure)
7         ucf --three-way /usr/share/nfs-kernel-server/conffiles/etc.exports /etc/exports
8         ucf --three-way /usr/share/nfs-kernel-server/conffiles/nfs-kernel-server.default /etc/default/nfs-kernel-server
9
10         for f in /var/lib/nfs/etab  \
11                  /var/lib/nfs/rmtab \
12                  /var/lib/nfs/xtab; do
13             [ -e $f ] || touch $f
14         done
15
16         update-rc.d nfs-kernel-server defaults 20 80 >/dev/null
17     ;;
18 esac
19
20 act="restart"
21 [ "$1:$2" = "configure:" ] && act="start"
22 invoke-rc.d nfs-kernel-server $act