From 59840096395f070e67af445e509037ef565520d0 Mon Sep 17 00:00:00 2001
From: "Steinar H. Gunderson" <sesse@debian.org>
Date: Mon, 16 Jul 2007 18:04:52 +0200
Subject: [PATCH] Imported Debian patch 1.1.0-10

---
 debian/changelog           | 19 +++++++++++++++++++
 debian/nfs-common.init     |  4 ++--
 debian/nfs-common.manpages |  2 ++
 debian/nfs-common.postinst |  4 ++--
 4 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 4de04ec..4af72d3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,22 @@
+nfs-utils (1:1.1.0-10) unstable; urgency=high
+
+  * Start nfs-common in the /etc/rcS start-up sequence, making sure statd is
+    run before mountnfs runs, and finally obsoleting the hacks in mountnfs to
+    start nfs-common directly in some cases. S44 is used, which is right
+    between portmap (S43) and mountnfs (S45). As per discussion with Petter
+    Reinholdtsen on IRC. (Closes: #432511, #432750, #433119, #433133)
+    * Change the update-rc.d line in nfs-common.postinst to include the S
+      runlevel.
+    * Change the version check for the "update-rc.d -f nfs-common remove" line
+      to this version (1:1.1.0-10), so all older installations are properly
+      updated.
+  * In the LSB header for nfs-common.init, add $portmap to Required-Start.
+    Also add the S run level to Default-Start, to match the above change.
+  * Include {mount,umount}.nfs man pages in the nfs-common package -- thanks
+    to Neil Brown for spotting this. 
+
+ -- Steinar H. Gunderson <sesse@debian.org>  Mon, 16 Jul 2007 18:04:52 +0200
+
 nfs-utils (1:1.1.0-9) unstable; urgency=low
 
   * 04-umount-exit-status.patch: New patch, fixes the exit status from umount
diff --git a/debian/nfs-common.init b/debian/nfs-common.init
index 7cba679..54701d7 100644
--- a/debian/nfs-common.init
+++ b/debian/nfs-common.init
@@ -2,9 +2,9 @@
 
 ### BEGIN INIT INFO
 # Provides:          nfs-common
-# Required-Start:    $time
+# Required-Start:    $portmap $time
 # Required-Stop:     $time
-# Default-Start:     2 3 4 5
+# Default-Start:     2 3 4 5 S
 # Default-Stop:      0 1 6
 # Short-Description: NFS support files common to client and server
 # Description:       NFS is a popular protocol for file sharing across
diff --git a/debian/nfs-common.manpages b/debian/nfs-common.manpages
index 13eb948..7843287 100644
--- a/debian/nfs-common.manpages
+++ b/debian/nfs-common.manpages
@@ -6,3 +6,5 @@ debian/tmp/usr/share/man/man8/nfsstat*
 debian/tmp/usr/share/man/man8/showmount*
 debian/tmp/usr/share/man/man8/idmapd*
 debian/tmp/usr/share/man/man8/rpcdebug.8
+debian/tmp/usr/share/man/man8/mount.nfs.8
+debian/tmp/usr/share/man/man8/umount.nfs.8
diff --git a/debian/nfs-common.postinst b/debian/nfs-common.postinst
index 136ac9d..1c988d5 100644
--- a/debian/nfs-common.postinst
+++ b/debian/nfs-common.postinst
@@ -7,10 +7,10 @@ case "$1" in
 	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
 
-        if [ "$2" != "" ] && dpkg --compare-versions "$2" lt 1:1.1.0-8; then
+        if [ "$2" != "" ] && dpkg --compare-versions "$2" lt 1:1.1.0-10; then
             update-rc.d -f nfs-common remove >/dev/null
 	fi
-	update-rc.d nfs-common defaults 20 79 >/dev/null
+	update-rc.d nfs-common start 20 2 3 4 5 . stop 20 0 1 6 . start 44 S . >/dev/null
 
 	if ! getent passwd statd >/dev/null; then
 	    adduser --system --home /var/lib/nfs --no-create-home statd
-- 
2.39.5