rpms/nfs-utils/devel nfs-utils-1.0.9-return-mount-error.patch, NONE, 1.1 nfs-utils.spec, 1.106, 1.107

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Wed Sep 27 00:32:21 UTC 2006


Author: steved

Update of /cvs/dist/rpms/nfs-utils/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv10567

Modified Files:
	nfs-utils.spec 
Added Files:
	nfs-utils-1.0.9-return-mount-error.patch 
Log Message:
- mount.nfs was not returning a non-zero exit value 
  on failed mounts (bz 206705)


nfs-utils-1.0.9-return-mount-error.patch:
 mount.c |   29 ++++++++++++++++-------------
 1 files changed, 16 insertions(+), 13 deletions(-)

--- NEW FILE nfs-utils-1.0.9-return-mount-error.patch ---
--- nfs-utils-1.0.9/utils/mount/mount.c.orig	2006-09-26 11:32:13.000000000 -0400
+++ nfs-utils-1.0.9/utils/mount/mount.c	2006-09-26 20:23:50.000000000 -0400
@@ -476,21 +476,24 @@
 		}
 	}
 
-	if (!mnt_err && !fake) {
-		if(!(flags & MS_REMOUNT)) {
-			mnt_err = do_mount_syscall(spec, mount_point,
-					nfs_mount_vers == 4 ? "nfs4" : "nfs", flags, mount_opts);
-		
-			if(mnt_err) {
-				mount_error(mount_point);
-				exit(-1);
-			}
-		}
-		if(!nomtab) {
-			add_mtab(spec, mount_point, nfs_mount_vers == 4 ? "nfs4" : "nfs",
-				 flags, extra_opts, 0, 0);
+	if (fake)
+		return 0;
+	if (mnt_err)
+		exit(EX_FAIL);
+
+	if(!(flags & MS_REMOUNT)) {
+		mnt_err = do_mount_syscall(spec, mount_point,
+				nfs_mount_vers == 4 ? "nfs4" : "nfs", flags, mount_opts);
+
+		if(mnt_err) {
+			mount_error(mount_point);
+			exit(EX_FAIL);
 		}
 	}
+	if(!nomtab) {
+		add_mtab(spec, mount_point, nfs_mount_vers == 4 ? "nfs4" : "nfs",
+			 flags, extra_opts, 0, 0);
+	}
 
 	return 0;
 }


Index: nfs-utils.spec
===================================================================
RCS file: /cvs/dist/rpms/nfs-utils/devel/nfs-utils.spec,v
retrieving revision 1.106
retrieving revision 1.107
diff -u -r1.106 -r1.107
--- nfs-utils.spec	20 Sep 2006 14:23:06 -0000	1.106
+++ nfs-utils.spec	27 Sep 2006 00:32:15 -0000	1.107
@@ -32,6 +32,7 @@
 Patch58: nfs-utils-1.0.9-krb5-memory.patch
 Patch59: nfs-utils-1.0.9-mount-sloppy.patch
 Patch60: nfs-utils-1.0.9-mount-man-nfs.patch
+Patch61: nfs-utils-1.0.9-return-mount-error.patch
 
 Patch100: nfs-utils-1.0.9-compile.patch
 
@@ -84,6 +85,7 @@
 %patch58 -p1
 %patch59 -p1
 %patch60 -p1
+%patch61 -p1
 
 # Do the magic to get things to compile
 %patch100 -p1
@@ -257,6 +259,10 @@
 %endif
 
 %changelog
+* Tue Sep 26 2006 Steve Dickson <steved at redhat.com> 1.0.9-8
+- mount.nfs was not returning a non-zero exit value 
+  on failed mounts (bz 206705)
+
 * Wed Sep 20 2006 Karel Zak <kzak at redhat.com> 1.0.9-7
 - Added support for the mount -s (sloppy) option (#205038)
 - Added nfs.5 man page from util-linux




More information about the fedora-cvs-commits mailing list