From: Steinar H. Gunderson Date: Mon, 7 Aug 2006 19:27:37 +0000 (+0200) Subject: Imported Debian patch 1.0.9-6 X-Git-Tag: debian/1%1.0.9-6^0 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=415457d63cf2740c7356cb09b4a1577a2e3cb515;p=nfs-utils.git Imported Debian patch 1.0.9-6 --- diff --git a/debian/changelog b/debian/changelog index d09b237..84c9923 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +nfs-utils (1:1.0.9-6) unstable; urgency=low + + * Enable idmapd by default if we find an /etc/exports file, as NFSv4 exports + need idmapd. (See the init script for the complete reasoning). Also start + nfs-common on initial installation of nfs-kernel-server, as we don't want + to reboot or restart nfs-common manually just to get idmapd working the + first time. (Closes: #381366) + + -- Steinar H. Gunderson Mon, 7 Aug 2006 21:27:37 +0200 + nfs-utils (1:1.0.9-5) unstable; urgency=low * Put rpc.svcgssd back into place; removing it was obviously not what diff --git a/debian/nfs-common.init b/debian/nfs-common.init index 5c34c9e..f397e64 100644 --- a/debian/nfs-common.init +++ b/debian/nfs-common.init @@ -76,6 +76,20 @@ done exec 0<&9 9<&- +# +# We also need idmapd if we run an NFSv4 server. It's fairly difficult +# to autodetect whether there are NFSv4 exports or not, and idmapd is not a +# particularily heavy daemon, so we auto-enable it if we find an /etc/exports +# file. This does not mean that there are NFSv4 or other mounts active (or +# even that nfs-kernel-server is installed), but it matches what the "start" +# condition in nfs-kernel-server's init script does, which has a value in +# itself. +# +if [ -f /etc/exports ]; then + AUTO_NEED_IDMAPD=yes +fi + + case "$NEED_IDMAPD" in yes|no) ;; diff --git a/debian/nfs-kernel-server.postinst b/debian/nfs-kernel-server.postinst index f7dbc25..5788144 100644 --- a/debian/nfs-kernel-server.postinst +++ b/debian/nfs-kernel-server.postinst @@ -19,4 +19,5 @@ esac act="restart" [ "$1:$2" = "configure:" ] && act="start" +[ "$1:$2" = "configure:" ] && invoke-rc.d nfs-common start invoke-rc.d nfs-kernel-server $act