Skip to contentSkip to conversation

LDAPAUTOMASTER patch

PATCH Jeff Bastian 1 participant 1 message Mar 31, 2006 Kernel automounter

lore
Share & tools
lore
#0 lore raw

The /usr/lib/autofs/autofs-ldap-auto-master provides a number of command line options to help the program find your auto.master map if it's not in the default location on your LDAP servers, however, the /etc/rc.d/init.d/autofs script does not have any mechanism to pass in these command line options.

Attached is a patch (derived from Fedora Core 5's autofs-4.1.4-16.2.2 package) that adds an $LDAPAUTOMASTER variable to the /etc/sysconfig/autofs file and the same variable to the autofs-ldap-auto-master command in the init script.

Jeff Bastian

etc/rc.d/init.d/autofs +2 -1
diff -urN autofs-4.1.4-16.2.2/etc/rc.d/init.d/autofs autofs-4.1.4-16.2.2.patch/etc/rc.d/init.d/autofs
@@ -85,6 +85,7 @@
 	DISABLE_DIRECT=1
 	DAEMON_EXIT_WAIT=20
 	ONE_AUTO_MASTER=0
+	LDAPAUTOMASTER=""
 
 	[ -f /etc/sysconfig/autofs ] && . /etc/sysconfig/autofs
 
@@ -165,7 +166,7 @@
 function getldapmounts()
 {
     if [ -x /usr/lib/autofs/autofs-ldap-auto-master ]; then
-        /usr/lib/autofs/autofs-ldap-auto-master 2> /dev/null
+        /usr/lib/autofs/autofs-ldap-auto-master $LDAPAUTOMASTER 2> /dev/null
     fi
 }
 
etc/sysconfig/autofs +4 -0
diff -urN autofs-4.1.4-16.2.2/etc/sysconfig/autofs autofs-4.1.4-16.2.2.patch/etc/sysconfig/autofs
@@ -19,3 +19,7 @@
 # this value.
 DAEMON_EXIT_WAIT=10
 
+# LDAPAUTOMASTER contains command line arguments for the 
+# /usr/lib/autofs/autofs-ldap-auto-master program
+# Run the program with --help to see available options
+LDAPAUTOMASTER=""

_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs