summaryrefslogtreecommitdiffstats
path: root/utils/mount/mount.c
diff options
context:
space:
mode:
authorHarshula Jayasuriya <harshula@redhat.com>2009-11-16 13:39:35 -0500
committerSteve Dickson <steved@redhat.com>2009-11-16 13:39:35 -0500
commit1cf5510adf8cbf7c342d8fce73f0b62ac1f93612 (patch)
tree8309f327f79759769ff7c1198ce4dcdf07445f79 /utils/mount/mount.c
parentfa42ac173d1d7e37a4052471dfc15520a09f102e (diff)
downloadnfs-utils-1cf5510adf8cbf7c342d8fce73f0b62ac1f93612.tar.gz
nfs-utils-1cf5510adf8cbf7c342d8fce73f0b62ac1f93612.tar.xz
nfs-utils-1cf5510adf8cbf7c342d8fce73f0b62ac1f93612.zip
mount options can be lost when using bg option
When mounting an NFS export *without* the "bg" option, try_mount() is called only once. Before calling it, the variables mount_opts and extra_opts are set up. Then try_mount() calls nfsmount(), the latter assumes that the aforementioned variables can be modified. Most significantly, it allows the variable extra_opts to be modified. When the "bg" mount option is used *and* the first try_mount() attempt fails, it daemonizes the process and calls try_mount() again, unfortunately, we've lost the required mount options in the variable extra_opts. See https://bugzilla.redhat.com/show_bug.cgi?id=529370 for details. Signed-off-by: Harshula Jayasuriya <harshula@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'utils/mount/mount.c')
-rw-r--r--utils/mount/mount.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/utils/mount/mount.c b/utils/mount/mount.c
index 355df79..6b9e164 100644
--- a/utils/mount/mount.c
+++ b/utils/mount/mount.c
@@ -593,6 +593,9 @@ int main(int argc, char *argv[])
if (mnt_err == EX_BG) {
printf(_("%s: backgrounding \"%s\"\n"),
progname, spec);
+ printf(_("%s: mount options: \"%s\"\n"),
+ progname, extra_opts);
+
fflush(stdout);
/*