commit 4623964850df9c49a5ad5d77dffbb7181ed96a92 Author: Steve Dickson <steved@xxxxxxxxxx> Date: Mon Mar 9 14:01:38 2009 -0400 Added hooks to the mount command that allow mount options to be set in a configuration file Signed-off-by: Steve Dickson <steved@xxxxxxxxxx> diff --git a/utils/mount/mount.c b/utils/mount/mount.c index 06e2804..0c38ea3 100644 --- a/utils/mount/mount.c +++ b/utils/mount/mount.c @@ -46,6 +46,9 @@ #include "error.h" #include "stropts.h" #include "version.h" +#include "conffile.h" + +extern char *conf_get_mntopts(char *, char *, char *); char *progname; int nfs_mount_data_version; @@ -474,6 +477,11 @@ int main(int argc, char *argv[]) spec = argv[1]; mount_point = argv[2]; + /* + * Read the the default mount options + */ + conf_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,7 +567,10 @@ int main(int argc, char *argv[]) mnt_err = EX_USAGE; goto out; } - + /* + * Concatenate mount options from the configuration file + */ + mount_opts = conf_get_mntopts(spec, mount_point, mount_opts); parse_opts(mount_opts, &flags, &extra_opts); if (uid != 0) { -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html