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

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