Package: autofs Version: 5.0.7-3 Followup-For: Bug #646625 Dear Maintainer,
I can confirm that this bug still exists and is fixed as the reported described by the auto.net script in #533893. Since I just wasted a bunch of time not only because of the misleading nfs4 line in the existing auto.net script, but _also_ because of a misleading MOUNT_NFS_DEFAULT_PROTOCOL option in /etc/defaults/autofs, I fixed up auto.net to respect the afaik unused MOUNT_NFS_DEFAULT_PROTOCOL option. Thanks, ~David -- System Information: Debian Release: wheezy/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.6.0 (SMP w/4 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages autofs depends on: ii libc6 2.13-35 ii libxml2 2.8.0+dfsg1-6 ii multiarch-support 2.13-35 ii ucf 3.0025+nmu3 Versions of packages autofs recommends: ii kmod 9-2 ii module-init-tools 9-2 ii nfs-common 1:1.2.6-3 autofs suggests no packages. -- debconf-show failed
--- etc/auto.net~ 2012-11-06 01:28:05.573318889 -0700 +++ etc/auto.net 2012-11-06 11:58:36.118165043 -0700 @@ -11,36 +11,45 @@ # add "nonstrict" to make it OK for some filesystems to not mount # choose one of the two lines below depending on the NFS version in your # environment -opts="-fstype=nfs,hard,intr,nodev,nosuid" -#opts="-fstype=nfs4,hard,intr,nodev,nosuid,async" -# Showmount comes in a number of names and varieties. "showmount" is -# typically an older version which accepts the '--no-headers' flag -# but ignores it. "kshowmount" is the newer version installed with knfsd, -# which both accepts and acts on the '--no-headers' flag. -#SHOWMOUNT="kshowmount --no-headers -e $key" -#SHOWMOUNT="showmount -e $key | tail -n +2" - -for P in /bin /sbin /usr/bin /usr/sbin -do - for M in showmount kshowmount +[ -f /etc/default/autofs ] && . /etc/default/autofs + +if [ -z "$MOUNT_NFS_DEFAULT_PROTOCOL" -o "$MOUNT_NFS_DEFAULT_PROTOCOL" == "3" ]; then + # Showmount comes in a number of names and varieties. "showmount" is + # typically an older version which accepts the '--no-headers' flag + # but ignores it. "kshowmount" is the newer version installed with knfsd, + # which both accepts and acts on the '--no-headers' flag. + #SHOWMOUNT="kshowmount --no-headers -e $key" + #SHOWMOUNT="showmount -e $key | tail -n +2" + + for P in /bin /sbin /usr/bin /usr/sbin do - if [ -x $P/$M ] - then - SMNT=$P/$M - break - fi + for M in showmount kshowmount + do + if [ -x $P/$M ] + then + SMNT=$P/$M + break + fi + done done -done -[ -x $SMNT ] || exit 1 + [ -x $SMNT ] || exit 1 + + # Newer distributions get this right + SHOWMOUNT="$SMNT --no-headers -e $key" -# Newer distributions get this right -SHOWMOUNT="$SMNT --no-headers -e $key" + $SHOWMOUNT | LC_ALL=C cut -d' ' -f1 | LC_ALL=C sort -u | \ + awk -v key="$key" -v opts="$opts" -- ' + BEGIN { ORS=""; first=1 } + { if (first) { print opts; first=0 }; print " \\\n\t" $1, key ":" $1 } + END { if (!first) print "\n"; else exit 1 } + ' | sed 's/#/\\#/g' + opts="-fstype=nfs,hard,intr,nodev,nosuid" +else + # NFSv4 + opts="-fstype=nfs4,hard,intr,nodev,nosuid,async" + + echo "$opts $key:/" +fi -$SHOWMOUNT | LC_ALL=C cut -d' ' -f1 | LC_ALL=C sort -u | \ - awk -v key="$key" -v opts="$opts" -- ' - BEGIN { ORS=""; first=1 } - { if (first) { print opts; first=0 }; print " \\\n\t" $1, key ":" $1 } - END { if (!first) print "\n"; else exit 1 } - ' | sed 's/#/\\#/g'