[PC-BSD Commits] r18398 - pcbsd/current/src-sh/pc-adctl/scripts

svn at pcbsd.org svn at pcbsd.org
Fri Aug 10 15:56:37 PDT 2012


Author: johnh
Date: 2012-08-10 22:56:37 +0000 (Fri, 10 Aug 2012)
New Revision: 18398

Modified:
   pcbsd/current/src-sh/pc-adctl/scripts/pc-kerberos
   pcbsd/current/src-sh/pc-adctl/scripts/pc-ldap
   pcbsd/current/src-sh/pc-adctl/scripts/pc-samba
Log:
check if config file exists, if so, add it to the command string.



Modified: pcbsd/current/src-sh/pc-adctl/scripts/pc-kerberos
===================================================================
--- pcbsd/current/src-sh/pc-adctl/scripts/pc-kerberos	2012-08-10 22:49:40 UTC (rev 18397)
+++ pcbsd/current/src-sh/pc-adctl/scripts/pc-kerberos	2012-08-10 22:56:37 UTC (rev 18398)
@@ -18,6 +18,12 @@
 
 generate_krb5_conf()
 {
+	local cmd="${KRBCONF}"
+	if [ -f "${PATH_KRB5_CONFIG}" ]
+	then
+		cmd="${KRBCONF} -f ${PATH_KRB5_CONFIG}"
+	fi
+
 	local _dcname="${1}"
 	local _domainname="${2}"
 	local _netbiosname="${3}"
@@ -32,8 +38,8 @@
 
 	local tmp=$(mktemp /tmp/krb5.XXXXXX)
 
-	cp "${PATH_KRB5_CONFIG}" "${PATH_KRB5_CONFIG}.orig"
-	${KRBCONF} \
+	cp "${PATH_KRB5_CONFIG}" "${PATH_KRB5_CONFIG}.orig" >/dev/null 2>&1
+	${cmd} \
 		-c -m "^appdefaults.pam.forwardable=true" \
 		-c -m "^appdefaults.pam.krb4_convert=false" \
 		-c -m "^appdefaults.pam.debug=false" \

Modified: pcbsd/current/src-sh/pc-adctl/scripts/pc-ldap
===================================================================
--- pcbsd/current/src-sh/pc-adctl/scripts/pc-ldap	2012-08-10 22:49:40 UTC (rev 18397)
+++ pcbsd/current/src-sh/pc-adctl/scripts/pc-ldap	2012-08-10 22:56:37 UTC (rev 18398)
@@ -74,7 +74,7 @@
 	local cmd="${LDAPCONF}"
 	if [ -f "${OPENLDAP_CONF}" ]
 	then
-		cmd="${cmd} -f ${OPENLDAP_CONF}"
+		cmd="${LDAPCONF} -f ${OPENLDAP_CONF}"
 	fi
 
 	${cmd} \

Modified: pcbsd/current/src-sh/pc-adctl/scripts/pc-samba
===================================================================
--- pcbsd/current/src-sh/pc-adctl/scripts/pc-samba	2012-08-10 22:49:40 UTC (rev 18397)
+++ pcbsd/current/src-sh/pc-adctl/scripts/pc-samba	2012-08-10 22:56:37 UTC (rev 18398)
@@ -17,6 +17,12 @@
 
 ad_smbconf_start()
 {
+	local cmd="${SAMBACONF}"
+	if [ -f "${SMB_CONF}" ]
+	then
+		cmd="${SAMBACONF} -f ${SMB_CONF}"
+	fi
+
 	if checkyesno activedirectory_enable 2>/dev/null
 	then
 		local tmp=$(mktemp /tmp/samba.XXXXXX)
@@ -29,7 +35,7 @@
 		fi
 
 		cp "${SMB_CONF}" "${SMB_CONF}.orig"
-		${SAMBACONF} -f ${SMB_CONF} \
+		${cmd} \
 			-w -m "+global:security=ADS" \
 			-w -m "+global:realm=$(AD_get domainname | tr a-z A-Z)" \
 			-w -m "+global:workgroup=$(AD_get workgroup)" \



More information about the Commits mailing list