From b70981b68efcce5256eb11c6cd26ae123b10b6ea Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Fri, 24 Jul 2009 08:01:31 +0000 Subject: moved extra/* to main/ and fixed misc build issues --- main/nfs-utils/nfs-utils-mtab-sym.patch | 38 +++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 main/nfs-utils/nfs-utils-mtab-sym.patch (limited to 'main/nfs-utils/nfs-utils-mtab-sym.patch') diff --git a/main/nfs-utils/nfs-utils-mtab-sym.patch b/main/nfs-utils/nfs-utils-mtab-sym.patch new file mode 100644 index 00000000..1ebbd99b --- /dev/null +++ b/main/nfs-utils/nfs-utils-mtab-sym.patch @@ -0,0 +1,38 @@ +--- utils/mount/fstab.c ++++ utils/mount/fstab.c +@@ -57,7 +57,7 @@ mtab_does_not_exist(void) { + return var_mtab_does_not_exist; + } + +-static int ++int + mtab_is_a_symlink(void) { + get_mtab_info(); + return var_mtab_is_a_symlink; +--- utils/mount/fstab.h ++++ utils/mount/fstab.h +@@ -7,6 +7,7 @@ + #define _PATH_FSTAB "/etc/fstab" + #endif + ++int mtab_is_a_symlink(void); + int mtab_is_writable(void); + int mtab_does_not_exist(void); + void reset_mtab_info(void); +--- utils/mount/mount.c ++++ utils/mount/mount.c +@@ -230,6 +230,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+"); + -- cgit v1.2.3