]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - utils/mount/mount.c
revert
[nfs-utils.git] / utils / mount / mount.c
index eea00afe2679f28e3e4f10ea11c0553f5f51f712..cc078eba336db7f47ad7bae1a5e9f6826ec0a973 100644 (file)
@@ -203,6 +203,13 @@ create_mtab (void) {
        int flags;
        mntFILE *mfp;
 
+       /* Avoid writing if the mtab is a symlink to /proc/mounts, since
+          that would create a file /proc/mounts in case the proc filesystem
+          is not mounted, and the fchmod below would also fail. */
+       if (mtab_is_a_symlink()) {
+               return EX_SUCCESS;
+       }
+
        lock_mtab();
 
        mfp = nfs_setmntent (MOUNTED, "a+");