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

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