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

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