summaryrefslogtreecommitdiffstats
path: root/debian/nfs-common.postinst
diff options
context:
space:
mode:
Diffstat (limited to 'debian/nfs-common.postinst')
-rw-r--r--debian/nfs-common.postinst23
1 files changed, 23 insertions, 0 deletions
diff --git a/debian/nfs-common.postinst b/debian/nfs-common.postinst
new file mode 100644
index 0000000..d0ffe74
--- /dev/null
+++ b/debian/nfs-common.postinst
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ configure)
+ ucf --three-way /usr/share/nfs-common/conffiles/idmapd.conf /etc/idmapd.conf
+ ucf --three-way /usr/share/nfs-common/conffiles/nfs-common.default /etc/default/nfs-common
+ ucf --three-way /usr/share/nfs-common/conffiles/nfs.conf /etc/nfs.conf
+
+ if ! getent passwd statd >/dev/null; then
+ adduser --system --home /var/lib/nfs --no-create-home statd
+ fi
+
+ chown statd: /var/lib/nfs/sm \
+ /var/lib/nfs/sm.bak
+ if [ -f /var/lib/nfs/state ]; then
+ chown statd /var/lib/nfs/state
+ fi
+ ;;
+esac
+
+#DEBHELPER#