|
|
23b4c9 |
autofs-5.1.2 - add function conf_amd_get_map_options()
|
|
|
23b4c9 |
|
|
|
23b4c9 |
From: Ian Kent <raven@themaw.net>
|
|
|
23b4c9 |
|
|
|
23b4c9 |
Add configuration function to get the map_options option from
|
|
|
23b4c9 |
an amd mount configuration section.
|
|
|
23b4c9 |
|
|
|
23b4c9 |
Signed-off-by: Ian Kent <raven@themaw.net>
|
|
|
23b4c9 |
---
|
|
|
23b4c9 |
CHANGELOG | 1 +
|
|
|
23b4c9 |
include/defaults.h | 1 +
|
|
|
23b4c9 |
lib/defaults.c | 14 ++++++++++++++
|
|
|
23b4c9 |
3 files changed, 16 insertions(+)
|
|
|
23b4c9 |
|
|
|
23b4c9 |
--- autofs-5.0.7.orig/CHANGELOG
|
|
|
23b4c9 |
+++ autofs-5.0.7/CHANGELOG
|
|
|
23b4c9 |
@@ -229,6 +229,7 @@
|
|
|
23b4c9 |
- add function conf_amd_get_mount_paths().
|
|
|
23b4c9 |
- include amd mount sections mounts in master mounts list.
|
|
|
23b4c9 |
- check for conflicting amd section mounts.
|
|
|
23b4c9 |
+- add function conf_get_map_options().
|
|
|
23b4c9 |
|
|
|
23b4c9 |
25/07/2012 autofs-5.0.7
|
|
|
23b4c9 |
=======================
|
|
|
23b4c9 |
--- autofs-5.0.7.orig/include/defaults.h
|
|
|
23b4c9 |
+++ autofs-5.0.7/include/defaults.h
|
|
|
23b4c9 |
@@ -193,6 +193,7 @@ char *conf_amd_get_nis_domain(void);
|
|
|
23b4c9 |
unsigned int conf_amd_set_nis_domain(const char *);
|
|
|
23b4c9 |
char *conf_amd_get_map_defaults(const char *);
|
|
|
23b4c9 |
char *conf_amd_get_map_name(const char *);
|
|
|
23b4c9 |
+char *conf_amd_get_map_options(const char *);
|
|
|
23b4c9 |
char *conf_amd_get_map_type(const char *);
|
|
|
23b4c9 |
char *conf_amd_get_search_path(const char *);
|
|
|
23b4c9 |
unsigned int conf_amd_get_dismount_interval(const char *);
|
|
|
23b4c9 |
--- autofs-5.0.7.orig/lib/defaults.c
|
|
|
23b4c9 |
+++ autofs-5.0.7/lib/defaults.c
|
|
|
23b4c9 |
@@ -493,6 +493,11 @@ static int conf_load_amd_defaults(void)
|
|
|
23b4c9 |
if (ret == CFG_FAIL)
|
|
|
23b4c9 |
goto error;
|
|
|
23b4c9 |
|
|
|
23b4c9 |
+ ret = conf_update(sec, NAME_AMD_MAP_OPTIONS,
|
|
|
23b4c9 |
+ DEFAULT_AMD_MAP_OPTIONS, CONF_NONE);
|
|
|
23b4c9 |
+ if (ret == CFG_FAIL)
|
|
|
23b4c9 |
+ goto error;
|
|
|
23b4c9 |
+
|
|
|
23b4c9 |
ret = conf_update(sec, NAME_AMD_MAP_TYPE,
|
|
|
23b4c9 |
DEFAULT_AMD_MAP_TYPE, CONF_NONE);
|
|
|
23b4c9 |
if (ret == CFG_FAIL)
|
|
|
23b4c9 |
@@ -2004,6 +2009,15 @@ char *conf_amd_get_map_name(const char *
|
|
|
23b4c9 |
|
|
|
23b4c9 |
return tmp;
|
|
|
23b4c9 |
}
|
|
|
23b4c9 |
+
|
|
|
23b4c9 |
+char *conf_amd_get_map_options(const char *section)
|
|
|
23b4c9 |
+{
|
|
|
23b4c9 |
+ char *tmp = NULL;
|
|
|
23b4c9 |
+ if (section)
|
|
|
23b4c9 |
+ tmp = conf_get_string(section, NAME_AMD_MAP_OPTIONS);
|
|
|
23b4c9 |
+
|
|
|
23b4c9 |
+ return tmp;
|
|
|
23b4c9 |
+}
|
|
|
23b4c9 |
|
|
|
23b4c9 |
char *conf_amd_get_map_type(const char *section)
|
|
|
23b4c9 |
{
|