diff -Naur --exclude '*.orig' --exclude '*.rej' --exclude '*~' autofs-5.0.4-236/aclocal.m4 autofs-5.0.4-236-separate-config-files/aclocal.m4 --- autofs-5.0.4-236/aclocal.m4 2009-04-09 22:36:03.000000000 +0200 +++ autofs-5.0.4-236-separate-config-files/aclocal.m4 2009-04-09 22:36:18.000000000 +0200 @@ -73,7 +73,7 @@ dnl -------------------------------------------------------------------------- dnl AF_INIT_D dnl -dnl Check the location of the init.d directory +dnl Check the location of the service script directory dnl -------------------------------------------------------------------------- AC_DEFUN(AF_INIT_D, [if test -z "$initdir"; then @@ -89,6 +89,24 @@ fi]) dnl -------------------------------------------------------------------------- +dnl AF_INITCONF_D +dnl +dnl Check the location of the service configuration directory +dnl -------------------------------------------------------------------------- +AC_DEFUN(AF_INITCONF_D, +[if test -z "$initconfdir"; then + AC_MSG_CHECKING([location of the init.d configuration directory]) + for initconf_d in /etc/sysconfig /etc/default; do + if test -z "$initconfdir"; then + if test -d "$initconf_d"; then + initconfdir="$initconf_d" + AC_MSG_RESULT($initconfdir) + fi + fi + done +fi]) + +dnl -------------------------------------------------------------------------- dnl AF_CONF_D dnl dnl Check the location of the configuration defaults directory diff -Naur --exclude '*.orig' --exclude '*.rej' --exclude '*~' autofs-5.0.4-236/configure.in autofs-5.0.4-236-separate-config-files/configure.in --- autofs-5.0.4-236/configure.in 2009-04-09 22:36:03.000000000 +0200 +++ autofs-5.0.4-236-separate-config-files/configure.in 2009-04-09 22:36:18.000000000 +0200 @@ -39,12 +39,18 @@ AF_LINUX_PROCFS() # -# Location of init.d directory? +# Location of service script directory? # AF_INIT_D() AC_SUBST(initdir) # +# Location of service configuration directory? +# +AF_INITCONF_D() +AC_SUBST(initconfdir) + +# # Location of system config script directory? # AF_CONF_D() diff -Naur --exclude '*.orig' --exclude '*.rej' --exclude '*~' autofs-5.0.4-236/Makefile.conf.in autofs-5.0.4-236-separate-config-files/Makefile.conf.in --- autofs-5.0.4-236/Makefile.conf.in 2009-04-09 22:36:03.000000000 +0200 +++ autofs-5.0.4-236-separate-config-files/Makefile.conf.in 2009-04-09 22:36:18.000000000 +0200 @@ -90,3 +90,5 @@ # Location for init.d files initdir = @initdir@ +# Location for init.d files configuration +initconfdir = @initconfdir@ diff -Naur --exclude '*.orig' --exclude '*.rej' --exclude '*~' autofs-5.0.4-236/samples/autofs.conf.default.in autofs-5.0.4-236-separate-config-files/samples/autofs.conf.default.in --- autofs-5.0.4-236/samples/autofs.conf.default.in 2009-04-09 22:36:03.000000000 +0200 +++ autofs-5.0.4-236-separate-config-files/samples/autofs.conf.default.in 2009-04-09 22:36:39.000000000 +0200 @@ -1,5 +1,6 @@ # -# Define default options for autofs. +# automount daemon configuration file +# see README.urpmi for details # # MASTER_MAP_NAME - default map name for the master map. # @@ -104,13 +105,3 @@ # between 1:10 and 1:20 for each map. # #MAP_HASH_TABLE_SIZE=1024 -# -# General global options -# -# If the kernel supports using the autofs miscellanous device -# and you wish to use it you must set this configuration option -# to "yes" otherwise it will not be used. -USE_MISC_DEVICE="yes" -# -#OPTIONS="" -# diff -Naur --exclude '*.orig' --exclude '*.rej' --exclude '*~' autofs-5.0.4-236/samples/Makefile autofs-5.0.4-236-separate-config-files/samples/Makefile --- autofs-5.0.4-236/samples/Makefile 2009-04-09 22:36:03.000000000 +0200 +++ autofs-5.0.4-236-separate-config-files/samples/Makefile 2009-04-09 22:36:18.000000000 +0200 @@ -8,9 +8,7 @@ rc.autofs: rc.autofs.in sed -e "s|@@sbindir@@|$(sbindir)|g" \ - -e "s|@@autofslibdir@@|$(autofslibdir)|g" \ - -e "s|@@autofsconfdir@@|$(autofsconfdir)|g" \ - -e "s|@@initdir@@|$(initdir)|g" < rc.autofs.in > rc.autofs + -e "s|@@initconfdir@@|$(initconfdir)|g" < rc.autofs.in > rc.autofs autofs.conf.default: autofs.conf.default.in sed -e "s|@@autofsmapdir@@|$(autofsmapdir)|g" \ @@ -23,16 +21,19 @@ install -d -m 755 $(INSTALLROOT)$(autofslibdir) install -d -m 755 $(INSTALLROOT)/var/run/autofs -.PHONY: autofs.init +.PHONY: autofs.init autofs.initconf autofs.init: @echo ifneq ($(initdir),) install -d -m 755 $(INSTALLROOT)$(initdir) install rc.autofs -m 755 $(INSTALLROOT)$(initdir)/autofs -else - if test -d $(INSTALLROOT)/etc/rc.d ; then \ - install -c rc.autofs -m 755 $(INSTALLROOT)/etc/rc.d ; \ - fi +endif + +autofs.initconf: + @echo +ifneq ($(initconfdir),) + install -d -m 755 $(INSTALLROOT)$(initconfdir) + install sysconfig.autofs -m 644 $(INSTALLROOT)$(initconfdir)/autofs endif CONFIG = $(shell test -e $(INSTALLROOT)$(autofsconfdir)/autofs.orig || echo "-b --suffix=.orig") @@ -173,7 +174,7 @@ fi ; \ fi -install: rc.autofs autofs.conf.default dirs autofs.init autofs.conf \ +install: rc.autofs autofs.conf.default dirs autofs.init autofs.initconf autofs.conf \ autofs_ldap_auth.conf $(SAMPLES) @echo diff -Naur --exclude '*.orig' --exclude '*.rej' --exclude '*~' autofs-5.0.4-236/samples/rc.autofs.in autofs-5.0.4-236-separate-config-files/samples/rc.autofs.in --- autofs-5.0.4-236/samples/rc.autofs.in 2009-04-09 22:36:03.000000000 +0200 +++ autofs-5.0.4-236-separate-config-files/samples/rc.autofs.in 2009-04-09 22:36:18.000000000 +0200 @@ -22,7 +22,7 @@ prog=`basename $DAEMON` MODULE="autofs4" DEVICE="autofs" -confdir=@@autofsconfdir@@ +confdir=@@initconfdir@@ test -e $DAEMON || exit 0 diff -Naur --exclude '*.orig' --exclude '*.rej' --exclude '*~' autofs-5.0.4-236/samples/sysconfig.autofs autofs-5.0.4-236-separate-config-files/samples/sysconfig.autofs --- autofs-5.0.4-236/samples/sysconfig.autofs 1970-01-01 01:00:00.000000000 +0100 +++ autofs-5.0.4-236-separate-config-files/samples/sysconfig.autofs 2009-04-09 22:38:49.000000000 +0200 @@ -0,0 +1,10 @@ +# +# autofs service configuration file +# see README.urpmi for details +# +# If the kernel supports using the autofs miscellanous device +# and you wish to use it you must set this configuration option +# to "yes" otherwise it will not be used. +USE_MISC_DEVICE="yes" +# +#OPTIONS=""