Hi,

Since I never received any feedback on this bug, I've put an NMU in
DELAYED/14-day on gluck. The full patch is attached; please let me know if
there are any problems.

/* Steinar */
-- 
Homepage: http://www.sesse.net/
diff -u sysvinit-2.86.ds1/debian/initscripts/etc/init.d/mountnfs.sh 
sysvinit-2.86.ds1/debian/initscripts/etc/init.d/mountnfs.sh
--- sysvinit-2.86.ds1/debian/initscripts/etc/init.d/mountnfs.sh
+++ sysvinit-2.86.ds1/debian/initscripts/etc/init.d/mountnfs.sh
@@ -26,11 +26,16 @@
        # Read through fstab line by line. If it is NFS, set the flag
        # for mounting NFS file systems. If any NFS partition is found and it
        # not mounted with the nolock option, we start the portmapper.
+       # 
+       # If any sec={krb5,krb5i,krb5p} option is given, or any of the file
+       # systems are nfs4, we'll need to start rpc.gssd and/or rpc.idmapd too;
+       # we'll leave that to nfs-common.
        #
 
        exec 9<&0 </etc/fstab
 
        portmap=no
+       gss_or_idmap=no
        while read DEV MTPT FSTYPE OPTS REST
        do
                case "$DEV" in
@@ -52,6 +57,11 @@
                                portmap=yes
                                ;;
                        esac
+                       case "$OPTS" in
+                         
sec=krb5|*,sec=krb5|sec=krb5,*|*,sec=krb5i,*|sec=krb5i|*,sec=krb5i|sec=krb5i,*|*,sec=krb5i,*|sec=krb5p|*,sec=krb5p|sec=krb5p,*|*,sec=krb5p,*)
+                               gss_or_idmap=yes
+                               ;;
+                       esac
                        ;;
                  smbfs|cifs|coda|ncp|ncpfs|ocfs2|gfs)
                        ;;
@@ -69,6 +79,10 @@
                                ;;
                        esac
                fi
+               if [ "$FSTYPE" = "nfs4" ]
+               then
+                       gss_or_idmap=yes
+               fi
        done
 
        exec 0<&9 9<&-
@@ -95,6 +109,15 @@
                fi
        fi
 
+       #
+       # Initialize nfs-common (which starts rpc.gssd and/or rpc.idmapd, and 
loads
+       # the right kernel modules if applicable) if we use Kerberos and/or 
NFSv4 mounts.
+       #
+       if [ "$gss_or_idmap" = yes ] && [ -x /etc/init.d/nfs-common ]
+       then
+               /etc/init.d/nfs-common start
+       fi
+
        if [ "$NETFS" ]
        then
                mount_all_nfs() { mount -a -t$NETFS ; }
diff -u sysvinit-2.86.ds1/debian/changelog sysvinit-2.86.ds1/debian/changelog
--- sysvinit-2.86.ds1/debian/changelog
+++ sysvinit-2.86.ds1/debian/changelog
@@ -1,3 +1,12 @@
+sysvinit (2.86.ds1-14.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * mountnfs.sh: If needed, call nfs-common's init.d script to start
+    rpc.gssd or rpc.idmapd as needed. This is needed for Kerberized NFS
+    mounts and NFSv4 mounts. (Closes: #359176)    
+
+ -- Steinar H. Gunderson <[EMAIL PROTECTED]>  Sat,  6 May 2006 21:12:39 +0200
+
 sysvinit (2.86.ds1-14) unstable; urgency=low
 
   [ Thomas Hood ]

Reply via email to