Imported Debian patch 1.0.7-11
[nfs-utils.git] / debian / nfs-common.postinst
1 #!/bin/sh -e
2
3 #DEBHELPER#
4
5 case "$1" in
6     configure)
7         update-rc.d nfs-common defaults 21 79 >/dev/null
8
9         if ! getent passwd statd >/dev/null; then
10             adduser --system --home /nonexistent --no-create-home statd
11         fi
12         if [ "$2" = "" ] || dpkg --compare-versions "$2" lt 1.0.7-10; then
13             chown statd /var/lib/nfs/sm \
14                 /var/lib/nfs/sm.bak \
15                 /var/lib/nfs/state \
16                 /var/lib/nfs/rpc_pipefs
17         fi
18     ;;
19 esac
20
21 act="restart"
22 [ "$1:$2" = "configure:" ] && act="start"
23 invoke-rc.d nfs-common $act