1 --- a/utils/mount/fstab.c 2010-02-18 23:35:00.000000000 +1100
2 +++ b/utils/mount/fstab.c 2010-04-06 16:12:51.000000000 +1000
3 @@ -57,7 +57,7 @@ mtab_does_not_exist(void) {
4 return var_mtab_does_not_exist;
9 mtab_is_a_symlink(void) {
11 return var_mtab_is_a_symlink;
12 --- a/utils/mount/fstab.h 2010-02-18 23:35:00.000000000 +1100
13 +++ b/utils/mount/fstab.h 2010-04-06 16:12:51.000000000 +1000
15 #define _PATH_FSTAB "/etc/fstab"
18 +int mtab_is_a_symlink(void);
19 int mtab_is_writable(void);
20 int mtab_does_not_exist(void);
21 void reset_mtab_info(void);
22 --- a/utils/mount/mount.c 2010-02-18 23:35:00.000000000 +1100
23 +++ b/utils/mount/mount.c 2010-04-06 16:12:51.000000000 +1000
24 @@ -232,6 +232,13 @@ create_mtab (void) {
28 + /* Avoid writing if the mtab is a symlink to /proc/mounts, since
29 + that would create a file /proc/mounts in case the proc filesystem
30 + is not mounted, and the fchmod below would also fail. */
31 + if (mtab_is_a_symlink()) {
37 mfp = nfs_setmntent (MOUNTED, "a+");