Description of problem: The -s (sloppy) option for the mount command is broken in the latest Fedora Core 6 test release. It ignores the sloppy mount option and returns an error message on unsupported mount options, and it returns an error code of 0 to the shell which indicates success even though it didn't mount anything. # mount -t nfs -s -o ro,nobrowse nfssrv:/path/to/dir /mnt Unsupported nfs mount option: nobrowse # echo $? 0 Returning 0 is breaking the automounter: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=199777 Version-Release number of selected component (if applicable): util-linux-2.13-0.40 How reproducible: Every time Steps to Reproduce: 1. Try to mount a directory using the -s flag and a bad mount option 2. Watch it return an error message on the unsupported mount option 3. Note the return value is 0 which indicates success Actual results: An error message was returned, the return value was 0 (success), and the directory was not mounted. Expected results: If the -s flag is used, the unsupported mount option should be ignored (or stripped), the mount should be made, and success returned (barring any other problems). If the -s flag is not used, the error message about unsupported mount options should be printed, the return code should be non-zero, and the mount should fail.
*** This bug has been marked as a duplicate of 205038 ***
*** Bug 188945 has been marked as a duplicate of this bug. ***
(In reply to comment #1) > > *** This bug has been marked as a duplicate of 205038 *** can you open the perms on the bug this is marked a duplicate of so we can see the status of 'sloppy' being ignored and know what the resolution is - when available? thanks.
The problem has been fixed. Update to util-linux-2.13-0.42 nfs-utils-1.0.9-7.fc6
I've updated my system to these packages and the sloppy option is fixed. However, the return code from 'mount' is not: # mount -o ro,nobrowse server:/some/path; echo $? Unsupported nfs mount option: nobrowse 0 Shouldn't $? be non-zero to indicate an error? The automounter depends on the error codes returning accurate information. See BZ 199777. (I tried to post this to BZ 205038 but it says I don't have permissions to do so.)
(In reply to comment #5) > I've updated my system to these packages and the sloppy option is fixed. > However, the return code from 'mount' is not: > # mount -o ro,nobrowse server:/some/path; echo $? > Unsupported nfs mount option: nobrowse > 0 > > Shouldn't $? be non-zero to indicate an error? Yes I thibk that is wrong. > > The automounter depends on the error codes returning accurate information. See > BZ 199777. Does the mount occur anyway? Perhaps the return is an indication of that and the message is informational. The handling of autofs specific mount options (they are interpreted, removed and handled internaly) was fixed in autofs-5.0.1-0.rc2.2 which of course is not available due to the freeze. Ian
The problem with exit code has been fixed in nfs-utils: * Tue Sep 26 2006 Steve Dickson <steved> 1.0.9-8 - mount.nfs was not returning a non-zero exit value on failed mounts (bz 206705) *** This bug has been marked as a duplicate of 206705 ***