NFS kernel server initscript contains errors

Bug #968211 reported by Marios Makassikis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nfs-utils (Ubuntu)
New
Undecided
Unassigned

Bug Description

1) The release of Ubuntu you are using
I checked on the ubuntu install I have here - 12.04 precise pangolin beta - but it's likely the
bug is present in older versions too.

2) The version of the package you are using
nfs-kernel-server:
    Installed: 1:1.2.5-3ubuntu1

3) What you expected to happen
I expected mountd to be started for NFSv3

4) What happened instead
mountd was started, but version 1 and 2 only -- according to rpcinfo -p

5) The fix
The rpcinfo binary is located in /usr/sbin rather than /usr/bin

$PREFIX/bin/rpcinfo -u localhost nfs 3 >/dev/null 2>&1 ||
RPCMOUNTDOPTS="$RPCMOUNTDOPTS --no-nfs-version 3"

Whereas it should be:

$PREFIX/sbin/rpcinfo -u localhost nfs 3 >/dev/null 2>&1 ||
RPCMOUNTDOPTS="$RPCMOUNTDOPTS --no-nfs-version 3"

6) Possible improvement

Perhaps it can be further improved to check if the nfs process listens on TCP
rather than UDP.

I'm thinking this should do the trick:

$PREFIX/sbin/rpcinfo -u localhost nfs 3 >/dev/null 2>&1 ||
$PREFIX/sbin/rpcinfo -p localhost nfs 3 >/dev/null 2>&1 ||
RPCMOUNTDOPTS="$RPCMOUNTDOPTS --no-nfs-version 3"

If nfs 3 doesn't listen at least on one protocol, then RPCMOUNTDOPTS is
modified accordingly.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.