diff options
author | Steve Dickson <steved@redhat.com> | 2009-08-07 14:29:07 -0400 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2009-08-16 16:53:53 -0400 |
commit | 9082582d6675e45067838805a65b6fcc07164557 (patch) | |
tree | 334623dc651259d2989a6bc55c4277e6af9e9629 /utils/mount/mount.c | |
parent | 0cdb36e69a51eabc119de314e43d40daf6ee49ab (diff) | |
download | nfs-utils-9082582d6675e45067838805a65b6fcc07164557.tar.gz nfs-utils-9082582d6675e45067838805a65b6fcc07164557.tar.xz nfs-utils-9082582d6675e45067838805a65b6fcc07164557.zip |
Added hooks to the mount command that allow
mount options to be set in a configuration file
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'utils/mount/mount.c')
-rw-r--r-- | utils/mount/mount.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/utils/mount/mount.c b/utils/mount/mount.c index a668cd9..909fedf 100644 --- a/utils/mount/mount.c +++ b/utils/mount/mount.c @@ -37,6 +37,7 @@ #include "xcommon.h" #include "nls.h" #include "mount_constants.h" +#include "mount_config.h" #include "nfs_paths.h" #include "nfs_mntent.h" @@ -474,6 +475,8 @@ int main(int argc, char *argv[]) spec = argv[1]; mount_point = argv[2]; + mount_config_init(); + argv[2] = argv[0]; /* so that getopt error messages are correct */ while ((c = getopt_long(argc - 2, argv + 2, "rvVwfno:hs", longopts, NULL)) != -1) { @@ -559,6 +562,10 @@ int main(int argc, char *argv[]) mnt_err = EX_USAGE; goto out; } + /* + * Concatenate mount options from the configuration file + */ + mount_opts = mount_config_opts(spec, mount_point, mount_opts); parse_opts(mount_opts, &flags, &extra_opts); |