Blame SOURCES/autofs-5.0.9-amd-lookup-split-config-into-init-and-config-settings.patch

6bbd11
autofs-5.0.9 - amd lookup split config into init and config settings
6bbd11
6bbd11
From: Ian Kent <ikent@redhat.com>
6bbd11
6bbd11
Split the configuration into program and init time configuration files.
6bbd11
The bulk of the configuration is now in the daemon configuration file
6bbd11
in /etc/autofs.conf by default.
6bbd11
6bbd11
The daemon configuration names are now lower case but in reality are
6bbd11
(and have always been) case insensitive.
6bbd11
6bbd11
Also, read the old configuration from the old configuration location
6bbd11
after reading the new configuration to ensure that people updating
6bbd11
don't get a surprize if they don't update the existing setup they
6bbd11
have. Note that this means that if the old configuration isn't updated
6bbd11
changes made in the new configuration will be overridden by the old.
6bbd11
---
6bbd11
 autofs.spec                    |    2 
6bbd11
 lib/defaults.c                 |   22 ++++++
6bbd11
 man/auto.master.5.in           |   39 ++++++-----
6bbd11
 redhat/Makefile                |    6 -
6bbd11
 redhat/autofs.conf.default.in  |  131 ++++++++++++++++++++++++++++++++++++++
6bbd11
 redhat/autofs.sysconfig        |   14 ++++
6bbd11
 redhat/autofs.sysconfig.in     |  138 -----------------------------------------
6bbd11
 samples/Makefile               |   44 ++++++++++---
6bbd11
 samples/autofs.conf.default.in |  109 +++++++++++++++-----------------
6bbd11
 samples/autofs.init.conf       |   14 ++++
6bbd11
 10 files changed, 293 insertions(+), 226 deletions(-)
6bbd11
 create mode 100644 redhat/autofs.conf.default.in
6bbd11
 create mode 100644 redhat/autofs.sysconfig
6bbd11
 delete mode 100644 redhat/autofs.sysconfig.in
6bbd11
 create mode 100644 samples/autofs.init.conf
6bbd11
6bbd11
--- autofs-5.0.7.orig/autofs.spec
6bbd11
+++ autofs-5.0.7/autofs.spec
6bbd11
@@ -117,6 +117,7 @@ install -m 644 redhat/autofs.service $RP
6bbd11
 install -m 755 redhat/autofs.init $RPM_BUILD_ROOT/etc/rc.d/init.d/autofs
6bbd11
 %define init_file_name /etc/rc.d/init.d/autofs
6bbd11
 %endif
6bbd11
+install -m 644 redhat/autofs.conf $RPM_BUILD_ROOT/etc/autofs.conf
6bbd11
 install -m 644 redhat/autofs.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/autofs
6bbd11
 
6bbd11
 %clean
6bbd11
@@ -176,6 +177,7 @@ fi
6bbd11
 %doc CREDITS CHANGELOG INSTALL COPY* README* samples/ldap* samples/autofs.schema samples/autofs_ldap_auth.conf
6bbd11
 %config %{init_file_name}
6bbd11
 %config(noreplace) /etc/auto.master
6bbd11
+%config(noreplace) /etc/autofs.conf
6bbd11
 %config(noreplace,missingok) /etc/auto.misc
6bbd11
 %config(noreplace,missingok) /etc/auto.net
6bbd11
 %config(noreplace,missingok) /etc/auto.smb
6bbd11
--- autofs-5.0.7.orig/lib/defaults.c
6bbd11
+++ autofs-5.0.7/lib/defaults.c
6bbd11
@@ -33,7 +33,14 @@
6bbd11
 #define AUTOFS_GLOBAL_SECTION		"autofs"
6bbd11
 #define AMD_GLOBAL_SECTION		"amd"
6bbd11
 
6bbd11
-#define DEFAULT_CONFIG_FILE		AUTOFS_CONF_DIR "/autofs"
6bbd11
+/*
6bbd11
+ * The configuration location has changed.
6bbd11
+ * The name of the configuration is now autofs.conf and it is
6bbd11
+ * located in the same directory as the maps. AUTOFS_CONF_DIR
6bbd11
+ * remains pointed at the init system configuration.
6bbd11
+ */
6bbd11
+#define DEFAULT_CONFIG_FILE		AUTOFS_MAP_DIR "/autofs.conf"
6bbd11
+#define OLD_CONFIG_FILE			AUTOFS_CONF_DIR "/autofs"
6bbd11
 #define MAX_LINE_LEN			256
6bbd11
 #define MAX_SECTION_NAME		MAX_LINE_LEN
6bbd11
 
6bbd11
@@ -965,6 +972,19 @@ unsigned int defaults_read_config(unsign
6bbd11
 
6bbd11
 	fclose(f);
6bbd11
 
6bbd11
+	/*
6bbd11
+	 * Try to read the old config file and override the installed
6bbd11
+	 * defaults in case user has a stale config following updating
6bbd11
+	 * to the new config file location.
6bbd11
+	 */
6bbd11
+
6bbd11
+	f = open_fopen_r(OLD_CONFIG_FILE);
6bbd11
+	if (!f)
6bbd11
+		goto out;
6bbd11
+
6bbd11
+	read_config(to_syslog, f, OLD_CONFIG_FILE);
6bbd11
+
6bbd11
+	fclose(f);
6bbd11
 out:
6bbd11
 	pthread_mutex_unlock(&conf_mutex);
6bbd11
 	return 1;
6bbd11
--- autofs-5.0.7.orig/man/auto.master.5.in
6bbd11
+++ autofs-5.0.7/man/auto.master.5.in
6bbd11
@@ -214,44 +214,44 @@ configuration file
6bbd11
 .hy
6bbd11
 They are:
6bbd11
 .TP
6bbd11
-.B TIMEOUT
6bbd11
+.B timeout
6bbd11
 Sets the default mount timeout in seconds. The internal program
6bbd11
 default is 10 minutes, but the default installed configuration
6bbd11
 overrides this and sets the timeout to 5 minutes to be consistent
6bbd11
 with earlier autofs releases.
6bbd11
 .TP
6bbd11
-.B NEGATIVE_TIMEOUT
6bbd11
+.B negative_timeout
6bbd11
 Set the default timeout for caching failed key lookups (program default
6bbd11
 60). If the equivalent command line option is given it will override this
6bbd11
 setting.
6bbd11
 .TP
6bbd11
-.B MOUNT_WAIT
6bbd11
+.B mount_wait
6bbd11
 Set the default time to wait for a response from a spawned mount(8)
6bbd11
 before sending it a SIGTERM. Note that we still need to wait for the
6bbd11
 RPC layer to timeout before the sub-process exits so this isn't ideal
6bbd11
 but it is the best we can do. The default is to wait until mount(8)
6bbd11
 returns without intervention.
6bbd11
 .TP
6bbd11
-.B UMOUNT_WAIT
6bbd11
+.B umount_wait
6bbd11
 Set the default time to wait for a response from a spawned umount(8)
6bbd11
 before sending it a SIGTERM. Note that we still need to wait for the
6bbd11
 RPC layer to timeout before the sub-process exits so this isn't ideal
6bbd11
 but it is the best we can do.
6bbd11
 .TP
6bbd11
-.B BROWSE_MODE
6bbd11
+.B browse_mode
6bbd11
 Maps are browsable by default (program default "yes").
6bbd11
 .TP
6bbd11
-.B MOUNT_NFS_DEFAULT_PROTOCOL
6bbd11
+.B mount_nfs_default_protocol
6bbd11
 Specify the default protocol used by mount.nfs(8) (program default 3). Since
6bbd11
 we can't identify this default automatically we need to set it in the autofs
6bbd11
 configuration.
6bbd11
 .TP
6bbd11
-.B APPEND_OPTIONS
6bbd11
+.B append_options
6bbd11
 Determine whether global options, given on the command line or per mount
6bbd11
 in the master map, are appended to map entry options or if the map entry
6bbd11
 options replace the global options (program default "yes", append options).
6bbd11
 .TP
6bbd11
-.B LOGGING
6bbd11
+.B logging
6bbd11
 set default log level "none", "verbose" or "debug" (program default "none").
6bbd11
 .SH BUILTIN MAP -hosts
6bbd11
 If "-hosts" is given as the map then accessing a key under the mount point
6bbd11
@@ -317,15 +317,15 @@ values must be set, any partial schema s
6bbd11
 .P
6bbd11
 The configuration settings available are:
6bbd11
 .TP
6bbd11
-.B LDAP_TIMEOUT
6bbd11
+.B ldap_timeout
6bbd11
 Set the network response timeout (default 8).
6bbd11
 Set timeout value for the synchronous API  calls. The default is the LDAP
6bbd11
 library default of an infinite timeout.
6bbd11
 .TP
6bbd11
-.B LDAP_NETWORK_TIMEOUT
6bbd11
+.B ldap_network_timeout
6bbd11
 Set the network response timeout (default 8).
6bbd11
 .TP
6bbd11
-.B LDAP_URI
6bbd11
+.B ldap_uri
6bbd11
 A space seperated list of server uris of the form <proto>://<server>[/]
6bbd11
 where <proto> can be ldap or ldaps. The option can be given multiple times.
6bbd11
 Map entries that include a server name override this option and it is then
6bbd11
@@ -341,34 +341,34 @@ SRV RR lookup. The server list returned
6bbd11
 according to the minimum ttl found in the SRV RR records or after one hour,
6bbd11
 whichever is less.
6bbd11
 .TP
6bbd11
-.B SEARCH_BASE
6bbd11
+.B search_base
6bbd11
 The base dn to use when searching for amap base dn. This entry may be
6bbd11
 given multiple times and each will be checked for a map base dn in
6bbd11
 the order they occur in the configuration. The search base list is read
6bbd11
 at startup and whenever the daemon recieves a HUP signal.
6bbd11
 .TP
6bbd11
-.B MAP_OBJECT_CLASS
6bbd11
+.B map_object_class
6bbd11
 The map object class. In the \fBnisMap\fP schema this corresponds to the class
6bbd11
 \fBnisMap\fP and in the \fBautomountMap\fP schema it corresponds to the class
6bbd11
 \fBautomountMap\fP.
6bbd11
 .TP
6bbd11
-.B ENTRY_OBJECT_CLASS
6bbd11
+.B entry_object_class
6bbd11
 The map entry object class. In the \fBnisMap\fP schema this corresponds
6bbd11
 to the class \fBnisObject\fP and in the \fBautomountMap\fP schema it
6bbd11
 corresponds to the class \fBautomount\fP.
6bbd11
 .TP
6bbd11
-.B MAP_ATTRIBUTE
6bbd11
+.B map_attribute
6bbd11
 The attribute used to identify the name of the map to which this
6bbd11
 entry belongs.  In the \fBnisMap\fP schema this corresponds to the attribute
6bbd11
 \fBnisMapName\fP and in the \fBautomountMap\fP schema it corresponds to the
6bbd11
 attribute \fBou\fP or \fBautomountMapName\fP.
6bbd11
 .TP
6bbd11
-.B ENTRY_ATTRIBUTE
6bbd11
+.B entry_attribute
6bbd11
 The attribute used to identify a map key. In the \fBnisMap\fP schema this
6bbd11
 corresponds to the attribute \fBcn\fP and in the \fBautomountMap\fP schema
6bbd11
 it corresponds to the attribute \fBautomountKey\fP.
6bbd11
 .TP
6bbd11
-.B VALUE_ATTRIBUTE
6bbd11
+.B value_attribute
6bbd11
 The attribute used to identify the value of the map entry. In the \fBnisMap\fP
6bbd11
 schema this corresponds to the attribute \fBnisMapEntry\fP and in the \fBautomountMap\fP
6bbd11
 schema it corresponds to the attribute \fBautomountInformation\fP.
6bbd11
@@ -386,6 +386,11 @@ settings.  The default location of this
6bbd11
 .nh
6bbd11
 .BR @@autofsmapdir@@/autofs_ldap_auth.conf .
6bbd11
 .hy
6bbd11
+.TP
6bbd11
+.B auth_conf_file
6bbd11
+This configuration option may be used to specify an alternate location
6bbd11
+for the ldap authentication file
6bbd11
+.P
6bbd11
 If this file exists it will be used to establish whether TLS or authentication
6bbd11
 should be used.
6bbd11
 .P
6bbd11
--- autofs-5.0.7.orig/redhat/Makefile
6bbd11
+++ autofs-5.0.7/redhat/Makefile
6bbd11
@@ -2,7 +2,7 @@
6bbd11
 -include ../Makefile.conf
6bbd11
 include ../Makefile.rules
6bbd11
 
6bbd11
-all: autofs.init autofs.sysconfig autofs.service
6bbd11
+all: autofs.init autofs.conf autofs.service
6bbd11
 
6bbd11
 autofs.init: autofs.init.in
6bbd11
 	sed -e "s|@@sbindir@@|$(sbindir)|g" \
6bbd11
@@ -11,9 +11,9 @@ autofs.init: autofs.init.in
6bbd11
 	    -e "s|@@autofspiddir@@|$(autofspiddir)|g" \
6bbd11
 	    -e "s|@@initdir@@|$(initdir)|g" < autofs.init.in > autofs.init
6bbd11
 
6bbd11
-autofs.sysconfig: autofs.sysconfig.in
6bbd11
+autofs.conf: autofs.conf.default.in
6bbd11
 	sed -e "s|@@autofsmapdir@@|$(autofsmapdir)|g" \
6bbd11
-		< autofs.sysconfig.in > autofs.sysconfig
6bbd11
+		< autofs.conf.default.in > autofs.conf
6bbd11
 
6bbd11
 autofs.service: ../samples/autofs.service.in
6bbd11
 	sed -e "s|@@sbindir@@|$(sbindir)|g" \
6bbd11
--- /dev/null
6bbd11
+++ autofs-5.0.7/redhat/autofs.conf.default.in
6bbd11
@@ -0,0 +1,131 @@
6bbd11
+#
6bbd11
+# Define default options for autofs.
6bbd11
+#
6bbd11
+[ autofs ]
6bbd11
+#
6bbd11
+# master_map_name - default map name for the master map.
6bbd11
+#
6bbd11
+#master_map_name = auto.master
6bbd11
+#
6bbd11
+# timeout - set the default mount timeout in secons. The internal
6bbd11
+#	    program default is 10 minutes, but the default installed
6bbd11
+#	    configuration overrides this and sets the timeout to 5
6bbd11
+#	    minutes to be consistent with earlier autofs releases.
6bbd11
+#
6bbd11
+timeout = 300
6bbd11
+#
6bbd11
+# negative_timeout - set the default negative timeout for
6bbd11
+# 		     failed mount attempts (default 60).
6bbd11
+#
6bbd11
+#negative_timeout = 60
6bbd11
+#
6bbd11
+# mount_wait - time to wait for a response from mount(8).
6bbd11
+# 	       Setting this timeout can cause problems when
6bbd11
+# 	       mount would otherwise wait for a server that
6bbd11
+# 	       is temporarily unavailable, such as when it's
6bbd11
+# 	       restarting. The default setting (-1) of waiting
6bbd11
+# 	       for mount(8) usually results in a wait of around
6bbd11
+# 	       3 minutes.
6bbd11
+#
6bbd11
+#mount_wait = -1
6bbd11
+#
6bbd11
+# umount_wait - time to wait for a response from umount(8).
6bbd11
+#
6bbd11
+#umount_wait = 12
6bbd11
+#
6bbd11
+# browse_mode - maps are browsable by default.
6bbd11
+#
6bbd11
+browse_mode = no
6bbd11
+#
6bbd11
+# mount_nfs_default_protocol - specify the default protocol used by
6bbd11
+# 			       mount.nfs(8). Since we can't identify
6bbd11
+# 			       the default automatically we need to
6bbd11
+# 			       set it in our configuration.
6bbd11
+#
6bbd11
+#mount_nfs_default_protocol = 3
6bbd11
+mount_nfs_default_protocol = 4
6bbd11
+#
6bbd11
+# append_options - append to global options instead of replace.
6bbd11
+#
6bbd11
+#append_options = yes
6bbd11
+#
6bbd11
+# logging - set default log level "none", "verbose" or "debug"
6bbd11
+#
6bbd11
+#logging = none
6bbd11
+#
6bbd11
+# Define base dn for map dn lookup.
6bbd11
+#
6bbd11
+# Define server URIs
6bbd11
+#
6bbd11
+# ldap_uri - space seperated list of server uris of the form
6bbd11
+# 	     <proto>://<server>[/] where <proto> can be ldap
6bbd11
+# 	     or ldaps. The option can be given multiple times.
6bbd11
+# 	     Map entries that include a server name override
6bbd11
+# 	     this option.
6bbd11
+#
6bbd11
+#	     This configuration option can also be used to
6bbd11
+#	     request autofs lookup SRV RRs for a domain of
6bbd11
+#	     the form <proto>:///[<domain dn>]. Note that a
6bbd11
+#	     trailing "/" is not allowed when using this form.
6bbd11
+#	     If the domain dn is not specified the dns domain
6bbd11
+#	     name (if any) is used to construct the domain dn
6bbd11
+#	     for the SRV RR lookup. The server list returned
6bbd11
+#	     from an SRV RR lookup is refreshed according to
6bbd11
+#	     the minimum ttl found in the SRV RR records or
6bbd11
+#	     after one hour, whichever is less.
6bbd11
+#
6bbd11
+#ldap_uri = ""
6bbd11
+#
6bbd11
+# ldap_timeout - timeout value for the synchronous API  calls
6bbd11
+#		  (default is LDAP library default).
6bbd11
+#
6bbd11
+#ldap_timeout = -1
6bbd11
+#
6bbd11
+# ldap_network_timeout - set the network response timeout (default 8).
6bbd11
+#
6bbd11
+#ldap_network_timeout = 8
6bbd11
+#
6bbd11
+# search_base - base dn to use for searching for map search dn.
6bbd11
+# 		Multiple entries can be given and they are checked
6bbd11
+# 		in the order they occur here.
6bbd11
+#
6bbd11
+#search_base = ""
6bbd11
+#
6bbd11
+# Define the LDAP schema to used for lookups
6bbd11
+#
6bbd11
+# If no schema is set autofs will check each of the schemas
6bbd11
+# below in the order given to try and locate an appropriate
6bbd11
+# basdn for lookups. If you want to minimize the number of
6bbd11
+# queries to the server set the values here.
6bbd11
+#
6bbd11
+#map_object_class = nisMap
6bbd11
+#entry_object_class = nisObject
6bbd11
+#map_attribute = nisMapName
6bbd11
+#entry_attribute = cn
6bbd11
+#value_attribute= nisMapEntry
6bbd11
+#
6bbd11
+# Other common LDAP nameing
6bbd11
+#
6bbd11
+#map_object_class = automountMap
6bbd11
+#entry_object_class = automount
6bbd11
+#map_attribute = ou
6bbd11
+#entry_attribute = cn
6bbd11
+#value_attribute= automountInformation
6bbd11
+#
6bbd11
+#map_object_class = automountMap
6bbd11
+#entry_object_class = automount
6bbd11
+#map_attribute = automountMapName
6bbd11
+#entry_attribute = automountKey
6bbd11
+#value_attribute= automountInformation
6bbd11
+#
6bbd11
+# auth_conf_file - set the default location for the SASL
6bbd11
+#		   authentication configuration file.
6bbd11
+#
6bbd11
+#auth_conf_file = @@autofsmapdir@@/autofs_ldap_auth.conf
6bbd11
+#
6bbd11
+# map_hash_table_size - set the map cache hash table size.
6bbd11
+# 			Should be a power of 2 with a ratio roughly
6bbd11
+# 			between 1:10 and 1:20 for each map.
6bbd11
+#
6bbd11
+#map_hash_table_size = 1024
6bbd11
+#
6bbd11
--- /dev/null
6bbd11
+++ autofs-5.0.7/redhat/autofs.sysconfig
6bbd11
@@ -0,0 +1,14 @@
6bbd11
+#
6bbd11
+# Init syatem options
6bbd11
+#
6bbd11
+# If the kernel supports using the autofs miscellanous device
6bbd11
+# and you wish to use it you must set this configuration option
6bbd11
+# to "yes" otherwise it will not be used.
6bbd11
+#
6bbd11
+USE_MISC_DEVICE="yes"
6bbd11
+#
6bbd11
+# Use OPTIONS to add automount(8) command line options that
6bbd11
+# will be used when the daemon is started.
6bbd11
+#
6bbd11
+#OPTIONS=""
6bbd11
+#
6bbd11
--- autofs-5.0.7.orig/redhat/autofs.sysconfig.in
6bbd11
+++ /dev/null
6bbd11
@@ -1,138 +0,0 @@
6bbd11
-#
6bbd11
-# Define default options for autofs.
6bbd11
-#
6bbd11
-# MASTER_MAP_NAME - default map name for the master map.
6bbd11
-#
6bbd11
-#MASTER_MAP_NAME="auto.master"
6bbd11
-#
6bbd11
-# TIMEOUT - set the default mount timeout in secons. The internal
6bbd11
-#	    program default is 10 minutes, but the default installed
6bbd11
-#	    configuration overrides this and sets the timeout to 5
6bbd11
-#	    minutes to be consistent with earlier autofs releases.
6bbd11
-#
6bbd11
-TIMEOUT=300
6bbd11
-#
6bbd11
-# NEGATIVE_TIMEOUT - set the default negative timeout for
6bbd11
-# 		     failed mount attempts (default 60).
6bbd11
-#
6bbd11
-#NEGATIVE_TIMEOUT=60
6bbd11
-#
6bbd11
-# MOUNT_WAIT - time to wait for a response from mount(8).
6bbd11
-# 	       Setting this timeout can cause problems when
6bbd11
-# 	       mount would otherwise wait for a server that
6bbd11
-# 	       is temporarily unavailable, such as when it's
6bbd11
-# 	       restarting. The default setting (-1) of waiting
6bbd11
-# 	       for mount(8) usually results in a wait of around
6bbd11
-# 	       3 minutes.
6bbd11
-#
6bbd11
-#MOUNT_WAIT=-1
6bbd11
-#
6bbd11
-# UMOUNT_WAIT - time to wait for a response from umount(8).
6bbd11
-#
6bbd11
-#UMOUNT_WAIT=12
6bbd11
-#
6bbd11
-# BROWSE_MODE - maps are browsable by default.
6bbd11
-#
6bbd11
-BROWSE_MODE="no"
6bbd11
-#
6bbd11
-# MOUNT_NFS_DEFAULT_PROTOCOL - specify the default protocol used by
6bbd11
-# 			       mount.nfs(8). Since we can't identify
6bbd11
-# 			       the default automatically we need to
6bbd11
-# 			       set it in our configuration.
6bbd11
-#
6bbd11
-#MOUNT_NFS_DEFAULT_PROTOCOL=3
6bbd11
-MOUNT_NFS_DEFAULT_PROTOCOL=4
6bbd11
-#
6bbd11
-# APPEND_OPTIONS - append to global options instead of replace.
6bbd11
-#
6bbd11
-#APPEND_OPTIONS="yes"
6bbd11
-#
6bbd11
-# LOGGING - set default log level "none", "verbose" or "debug"
6bbd11
-#
6bbd11
-#LOGGING="none"
6bbd11
-#
6bbd11
-# Define base dn for map dn lookup.
6bbd11
-#
6bbd11
-# Define server URIs
6bbd11
-#
6bbd11
-# LDAP_URI - space seperated list of server uris of the form
6bbd11
-# 	     <proto>://<server>[/] where <proto> can be ldap
6bbd11
-# 	     or ldaps. The option can be given multiple times.
6bbd11
-# 	     Map entries that include a server name override
6bbd11
-# 	     this option.
6bbd11
-#
6bbd11
-#	     This configuration option can also be used to
6bbd11
-#	     request autofs lookup SRV RRs for a domain of
6bbd11
-#	     the form <proto>:///[<domain dn>]. Note that a
6bbd11
-#	     trailing "/" is not allowed when using this form.
6bbd11
-#	     If the domain dn is not specified the dns domain
6bbd11
-#	     name (if any) is used to construct the domain dn
6bbd11
-#	     for the SRV RR lookup. The server list returned
6bbd11
-#	     from an SRV RR lookup is refreshed according to
6bbd11
-#	     the minimum ttl found in the SRV RR records or
6bbd11
-#	     after one hour, whichever is less.
6bbd11
-#
6bbd11
-#LDAP_URI=""
6bbd11
-#
6bbd11
-# LDAP__TIMEOUT - timeout value for the synchronous API  calls
6bbd11
-#		  (default is LDAP library default).
6bbd11
-#
6bbd11
-#LDAP_TIMEOUT=-1
6bbd11
-#
6bbd11
-# LDAP_NETWORK_TIMEOUT - set the network response timeout (default 8).
6bbd11
-#
6bbd11
-#LDAP_NETWORK_TIMEOUT=8
6bbd11
-#
6bbd11
-# SEARCH_BASE - base dn to use for searching for map search dn.
6bbd11
-# 		Multiple entries can be given and they are checked
6bbd11
-# 		in the order they occur here.
6bbd11
-#
6bbd11
-#SEARCH_BASE=""
6bbd11
-#
6bbd11
-# Define the LDAP schema to used for lookups
6bbd11
-#
6bbd11
-# If no schema is set autofs will check each of the schemas
6bbd11
-# below in the order given to try and locate an appropriate
6bbd11
-# basdn for lookups. If you want to minimize the number of
6bbd11
-# queries to the server set the values here.
6bbd11
-#
6bbd11
-#MAP_OBJECT_CLASS="nisMap"
6bbd11
-#ENTRY_OBJECT_CLASS="nisObject"
6bbd11
-#MAP_ATTRIBUTE="nisMapName"
6bbd11
-#ENTRY_ATTRIBUTE="cn"
6bbd11
-#VALUE_ATTRIBUTE="nisMapEntry"
6bbd11
-#
6bbd11
-# Other common LDAP nameing
6bbd11
-#
6bbd11
-#MAP_OBJECT_CLASS="automountMap"
6bbd11
-#ENTRY_OBJECT_CLASS="automount"
6bbd11
-#MAP_ATTRIBUTE="ou"
6bbd11
-#ENTRY_ATTRIBUTE="cn"
6bbd11
-#VALUE_ATTRIBUTE="automountInformation"
6bbd11
-#
6bbd11
-#MAP_OBJECT_CLASS="automountMap"
6bbd11
-#ENTRY_OBJECT_CLASS="automount"
6bbd11
-#MAP_ATTRIBUTE="automountMapName"
6bbd11
-#ENTRY_ATTRIBUTE="automountKey"
6bbd11
-#VALUE_ATTRIBUTE="automountInformation"
6bbd11
-#
6bbd11
-# AUTH_CONF_FILE - set the default location for the SASL
6bbd11
-#			   authentication configuration file.
6bbd11
-#
6bbd11
-#AUTH_CONF_FILE="@@autofsmapdir@@/autofs_ldap_auth.conf"
6bbd11
-#
6bbd11
-# MAP_HASH_TABLE_SIZE - set the map cache hash table size.
6bbd11
-# 			Should be a power of 2 with a ratio roughly
6bbd11
-# 			between 1:10 and 1:20 for each map.
6bbd11
-#
6bbd11
-#MAP_HASH_TABLE_SIZE=1024
6bbd11
-#
6bbd11
-# General global options
6bbd11
-#
6bbd11
-# If the kernel supports using the autofs miscellanous device
6bbd11
-# and you wish to use it you must set this configuration option
6bbd11
-# to "yes" otherwise it will not be used.
6bbd11
-USE_MISC_DEVICE="yes"
6bbd11
-#
6bbd11
-#OPTIONS=""
6bbd11
-#
6bbd11
--- autofs-5.0.7.orig/samples/Makefile
6bbd11
+++ autofs-5.0.7/samples/Makefile
6bbd11
@@ -4,7 +4,7 @@ include ../Makefile.rules
6bbd11
 
6bbd11
 SAMPLES = auto.master auto.misc auto.net auto.smb
6bbd11
 
6bbd11
-all: rc.autofs autofs.conf.default autofs.service
6bbd11
+all: rc.autofs autofs.conf.default autofs.init.conf autofs.service
6bbd11
 
6bbd11
 rc.autofs: rc.autofs.in
6bbd11
 	sed -e "s|@@sbindir@@|$(sbindir)|g" \
6bbd11
@@ -46,26 +46,52 @@ else
6bbd11
    endif
6bbd11
 endif
6bbd11
 
6bbd11
-CONFIG = $(shell test -e $(INSTALLROOT)$(autofsconfdir)/autofs.orig || echo "-b --suffix=.orig")
6bbd11
-CEXISTS = $(shell test -e $(INSTALLROOT)$(autofsconfdir)/autofs || echo "no")
6bbd11
+#
6bbd11
+# The map directory contains the main autofs configuration ...
6bbd11
+#
6bbd11
+CONFIG = $(shell test -e $(INSTALLROOT)$(autofsmapdir)/autofs.conf.orig || echo "-b --suffix=.orig")
6bbd11
+CEXISTS = $(shell test -e $(INSTALLROOT)$(autofsmapdir)/autofs || echo "no")
6bbd11
 
6bbd11
 .PHONY: autofs.conf
6bbd11
 autofs.conf: autofs.conf.default
6bbd11
 	@echo
6bbd11
-	@echo "Installing autofs default configuation in $(autofsconfdir)"
6bbd11
+	@echo "Installing autofs default configuation in $(autofsmapdir)"
6bbd11
 	@if test -z "$(CONFIG)" ; \
6bbd11
 	then \
6bbd11
 		install -v autofs.conf.default -m 644 \
6bbd11
-			$(INSTALLROOT)$(autofsconfdir)/autofs.conf.new ; \
6bbd11
+			$(INSTALLROOT)$(autofsmapdir)/autofs.conf.new ; \
6bbd11
 		echo "Found existing backup of configuration file." ; \
6bbd11
 		echo "Installed package default configuration file as \"autofs.conf.new\"." ; \
6bbd11
 	else \
6bbd11
 		install -v autofs.conf.default -m 644 $(CONFIG) \
6bbd11
-				$(INSTALLROOT)$(autofsconfdir)/autofs ; \
6bbd11
-		echo "Installed package configuration configuration as \"autofs\"." ; \
6bbd11
+				$(INSTALLROOT)$(autofsmapdir)/autofs.conf ; \
6bbd11
+		echo "Installed package default configuration as \"autofs.conf\"." ; \
6bbd11
 		if test -z "$(CEXISTS)" ; \
6bbd11
 		then \
6bbd11
-			echo "Backup of existing configuration made to \"autofs.orig\"." ; \
6bbd11
+			echo "Backup of existing configuration made to \"autofs.conf.orig\"." ; \
6bbd11
+		fi ; \
6bbd11
+	fi
6bbd11
+
6bbd11
+CINIT = $(shell test -e $(INSTALLROOT)$(autofsconfdir)/autofs.orig || echo "-b --suffix=.orig")
6bbd11
+CIEXISTS = $(shell test -e $(INSTALLROOT)$(autofsconfdir)/autofs || echo "no")
6bbd11
+
6bbd11
+.PHONY: autofs.sysinit
6bbd11
+autofs.sysinit: autofs.init.conf
6bbd11
+	@echo
6bbd11
+	@echo "Installing autofs init configuation in $(autofsconfdir)"
6bbd11
+	@if test -z "$(CINIT)" ; \
6bbd11
+	then \
6bbd11
+		install -v autofs.init.conf -m 644 \
6bbd11
+			$(INSTALLROOT)$(autofsconfdir)/autofs.new ; \
6bbd11
+		echo "Found existing backup of init configuration file." ; \
6bbd11
+		echo "Installed package init configuration file as \"autofs.new\"." ; \
6bbd11
+	else \
6bbd11
+		install -v autofs.init.conf -m 644 $(CINIT) \
6bbd11
+				$(INSTALLROOT)$(autofsconfdir)/autofs ; \
6bbd11
+		echo "Installed package init configuration as \"autofs\"." ; \
6bbd11
+		if test -z "$(CIEXISTS)" ; \
6bbd11
+		then \
6bbd11
+			echo "Backup of existing init configuration made to \"autofs.orig\"." ; \
6bbd11
 		fi ; \
6bbd11
 	fi
6bbd11
 
6bbd11
@@ -185,7 +211,7 @@ auto.smb:
6bbd11
 	fi
6bbd11
 
6bbd11
 install: rc.autofs autofs.conf.default dirs autofs.init autofs.service \
6bbd11
-		autofs.conf autofs_ldap_auth.conf $(SAMPLES)
6bbd11
+		autofs.conf autofs.sysinit autofs_ldap_auth.conf $(SAMPLES)
6bbd11
 	@echo
6bbd11
 
6bbd11
 clean:
6bbd11
--- autofs-5.0.7.orig/samples/autofs.conf.default.in
6bbd11
+++ autofs-5.0.7/samples/autofs.conf.default.in
6bbd11
@@ -1,23 +1,25 @@
6bbd11
 #
6bbd11
 # Define default options for autofs.
6bbd11
 #
6bbd11
-# MASTER_MAP_NAME - default map name for the master map.
6bbd11
+[ autofs ]
6bbd11
 #
6bbd11
-#MASTER_MAP_NAME="auto.master"
6bbd11
+# master_map_name - default map name for the master map.
6bbd11
 #
6bbd11
-# TIMEOUT - set the default mount timeout in secons. The internal
6bbd11
+#master_map_name = auto.master
6bbd11
+#
6bbd11
+# timeout - set the default mount timeout in secons. The internal
6bbd11
 #	    program default is 10 minutes, but the default installed
6bbd11
 #	    configuration overrides this and sets the timeout to 5
6bbd11
 #	    minutes to be consistent with earlier autofs releases.
6bbd11
 #
6bbd11
-TIMEOUT=300
6bbd11
+timeout = 300
6bbd11
 #
6bbd11
-# NEGATIVE_TIMEOUT - set the default negative timeout for
6bbd11
+# negative_timeout - set the default negative timeout for
6bbd11
 # 		     failed mount attempts (default 60).
6bbd11
 #
6bbd11
-#NEGATIVE_TIMEOUT=60
6bbd11
+#negative_timeout = 60
6bbd11
 #
6bbd11
-# MOUNT_WAIT - time to wait for a response from mount(8).
6bbd11
+# mount_wait - time to wait for a response from mount(8).
6bbd11
 # 	       Setting this timeout can cause problems when
6bbd11
 # 	       mount would otherwise wait for a server that
6bbd11
 # 	       is temporarily unavailable, such as when it's
6bbd11
@@ -25,34 +27,36 @@ TIMEOUT=300
6bbd11
 # 	       for mount(8) usually results in a wait of around
6bbd11
 # 	       3 minutes.
6bbd11
 #
6bbd11
-#MOUNT_WAIT=-1
6bbd11
+#mount_wait = -1
6bbd11
 #
6bbd11
-# UMOUNT_WAIT - time to wait for a response from umount(8).
6bbd11
+# umount_wait - time to wait for a response from umount(8).
6bbd11
 #
6bbd11
-#UMOUNT_WAIT=12
6bbd11
+#umount_wait = 12
6bbd11
 #
6bbd11
-# BROWSE_MODE - maps are browsable by default.
6bbd11
+# browse_mode - maps are browsable by default.
6bbd11
 #
6bbd11
-BROWSE_MODE="no"
6bbd11
+browse_mode = no
6bbd11
 #
6bbd11
-# MOUNT_NFS_DEFAULT_PROTOCOL - specify the default protocol used by
6bbd11
+# mount_nfs_default_protocol - specify the default protocol used by
6bbd11
 # 			       mount.nfs(8). Since we can't identify
6bbd11
 # 			       the default automatically we need to
6bbd11
 # 			       set it in our configuration.
6bbd11
 #
6bbd11
-#MOUNT_NFS_DEFAULT_PROTOCOL=3
6bbd11
+#mount_nfs_default_protocol = 3
6bbd11
+#
6bbd11
+# append_options - append to global options instead of replace.
6bbd11
 #
6bbd11
-# APPEND_OPTIONS - append to global options instead of replace.
6bbd11
+#append_options = yes
6bbd11
 #
6bbd11
-#APPEND_OPTIONS="yes"
6bbd11
+# logging - set default log level "none", "verbose" or "debug"
6bbd11
 #
6bbd11
-# LOGGING - set default log level "none", "verbose" or "debug"
6bbd11
+#logging = none
6bbd11
 #
6bbd11
-#LOGGING="none"
6bbd11
+# Define base dn for map dn lookup.
6bbd11
 #
6bbd11
 # Define server URIs
6bbd11
 #
6bbd11
-# LDAP_URI - space seperated list of server uris of the form
6bbd11
+# ldap_uri - space seperated list of server uris of the form
6bbd11
 # 	     <proto>://<server>[/] where <proto> can be ldap
6bbd11
 # 	     or ldaps. The option can be given multiple times.
6bbd11
 # 	     Map entries that include a server name override
6bbd11
@@ -69,24 +73,22 @@ BROWSE_MODE="no"
6bbd11
 #	     the minimum ttl found in the SRV RR records or
6bbd11
 #	     after one hour, whichever is less.
6bbd11
 #
6bbd11
-#LDAP_URI=""
6bbd11
+#ldap_uri = ""
6bbd11
 #
6bbd11
-# LDAP__TIMEOUT - timeout value for the synchronous API  calls
6bbd11
+# ldap_timeout - timeout value for the synchronous API  calls
6bbd11
 #		  (default is LDAP library default).
6bbd11
 #
6bbd11
-#LDAP_TIMEOUT=-1
6bbd11
-#
6bbd11
-# LDAP_NETWORK_TIMEOUT - set the network response timeout (default 8).
6bbd11
+#ldap_timeout = -1
6bbd11
 #
6bbd11
-#LDAP_NETWORK_TIMEOUT=8
6bbd11
+# ldap_network_timeout - set the network response timeout (default 8).
6bbd11
 #
6bbd11
-# Define base dn for map dn lookup.
6bbd11
+#ldap_network_timeout = 8
6bbd11
 #
6bbd11
-# SEARCH_BASE - base dn to use for searching for map search dn.
6bbd11
+# search_base - base dn to use for searching for map search dn.
6bbd11
 # 		Multiple entries can be given and they are checked
6bbd11
 # 		in the order they occur here.
6bbd11
 #
6bbd11
-#SEARCH_BASE=""
6bbd11
+#search_base = ""
6bbd11
 #
6bbd11
 # Define the LDAP schema to used for lookups
6bbd11
 #
6bbd11
@@ -95,43 +97,34 @@ BROWSE_MODE="no"
6bbd11
 # basdn for lookups. If you want to minimize the number of
6bbd11
 # queries to the server set the values here.
6bbd11
 #
6bbd11
-#MAP_OBJECT_CLASS="nisMap"
6bbd11
-#ENTRY_OBJECT_CLASS="nisObject"
6bbd11
-#MAP_ATTRIBUTE="nisMapName"
6bbd11
-#ENTRY_ATTRIBUTE="cn"
6bbd11
-#VALUE_ATTRIBUTE="nisMapEntry"
6bbd11
+#map_object_class = nisMap
6bbd11
+#entry_object_class = nisObject
6bbd11
+#map_attribute = nisMapName
6bbd11
+#entry_attribute = cn
6bbd11
+#value_attribute= nisMapEntry
6bbd11
 #
6bbd11
 # Other common LDAP nameing
6bbd11
 #
6bbd11
-#MAP_OBJECT_CLASS="automountMap"
6bbd11
-#ENTRY_OBJECT_CLASS="automount"
6bbd11
-#MAP_ATTRIBUTE="ou"
6bbd11
-#ENTRY_ATTRIBUTE="cn"
6bbd11
-#VALUE_ATTRIBUTE="automountInformation"
6bbd11
-#
6bbd11
-#MAP_OBJECT_CLASS="automountMap"
6bbd11
-#ENTRY_OBJECT_CLASS="automount"
6bbd11
-#MAP_ATTRIBUTE="automountMapName"
6bbd11
-#ENTRY_ATTRIBUTE="automountKey"
6bbd11
-#VALUE_ATTRIBUTE="automountInformation"
6bbd11
+#map_object_class = automountMap
6bbd11
+#entry_object_class = automount
6bbd11
+#map_attribute = ou
6bbd11
+#entry_attribute = cn
6bbd11
+#value_attribute= automountInformation
6bbd11
+#
6bbd11
+#map_object_class = automountMap
6bbd11
+#entry_object_class = automount
6bbd11
+#map_attribute = automountMapName
6bbd11
+#entry_attribute = automountKey
6bbd11
+#value_attribute= automountInformation
6bbd11
 #
6bbd11
-# AUTH_CONF_FILE - set the default location for the SASL
6bbd11
-#			   authentication configuration file.
6bbd11
+# auth_conf_file - set the default location for the SASL
6bbd11
+#		   authentication configuration file.
6bbd11
 #
6bbd11
-#AUTH_CONF_FILE="@@autofsmapdir@@/autofs_ldap_auth.conf"
6bbd11
+#auth_conf_file = @@autofsmapdir@@/autofs_ldap_auth.conf
6bbd11
 #
6bbd11
-# MAP_HASH_TABLE_SIZE - set the map cache hash table size.
6bbd11
+# map_hash_table_size - set the map cache hash table size.
6bbd11
 # 			Should be a power of 2 with a ratio roughly
6bbd11
 # 			between 1:10 and 1:20 for each map.
6bbd11
 #
6bbd11
-#MAP_HASH_TABLE_SIZE=1024
6bbd11
-#
6bbd11
-# General global options
6bbd11
-#
6bbd11
-# If the kernel supports using the autofs miscellanous device
6bbd11
-# and you wish to use it you must set this configuration option
6bbd11
-# to "yes" otherwise it will not be used.
6bbd11
-USE_MISC_DEVICE="yes"
6bbd11
-#
6bbd11
-#OPTIONS=""
6bbd11
+#map_hash_table_size = 1024
6bbd11
 #
6bbd11
--- /dev/null
6bbd11
+++ autofs-5.0.7/samples/autofs.init.conf
6bbd11
@@ -0,0 +1,14 @@
6bbd11
+#
6bbd11
+# Init syatem options
6bbd11
+#
6bbd11
+# If the kernel supports using the autofs miscellanous device
6bbd11
+# and you wish to use it you must set this configuration option
6bbd11
+# to "yes" otherwise it will not be used.
6bbd11
+#
6bbd11
+USE_MISC_DEVICE="yes"
6bbd11
+#
6bbd11
+# Use OPTIONS to add automount(8) command line options that
6bbd11
+# will be used when the daemon is started.
6bbd11
+#
6bbd11
+#OPTIONS=""
6bbd11
+#