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

svn at pcbsd.org svn at pcbsd.org
Wed Sep 19 20:01:17 PDT 2012


Author: johnh
Date: 2012-09-20 03:01:17 +0000 (Thu, 20 Sep 2012)
New Revision: 19420

Modified:
   pcbsd/current/src-sh/pc-adctl/scripts/pc-pam
Log:
grep -> egrep -> fixes lots of mistakes.



Modified: pcbsd/current/src-sh/pc-adctl/scripts/pc-pam
===================================================================
--- pcbsd/current/src-sh/pc-adctl/scripts/pc-pam	2012-09-20 02:56:53 UTC (rev 19419)
+++ pcbsd/current/src-sh/pc-adctl/scripts/pc-pam	2012-09-20 03:01:17 UTC (rev 19420)
@@ -146,7 +146,7 @@
 	local class="${2}"
 	local index
 
-	index="$(egrep "^${class}" "${file}"|awk '{ printf("%d %s\n", n++, $0); }'|grep required|awk '{ print $1 }'|head -1)"
+	index="$(egrep "^${class}" "${file}"|awk '{ printf("%d %s\n", n++, $0); }'|egrep required|awk '{ print $1 }'|head -1)"
 	if [ -z "${index}" ]
 	then
 		index=0
@@ -238,7 +238,7 @@
 	for pam_dir in ${PAMDIRS}
 	do
 		local tmpdir="$(mktemp -d /tmp/pam.XXXXXX)"
-		local pam_files="$(ls "${pam_dir}" | grep -v README)"
+		local pam_files="$(ls "${pam_dir}" | egrep -v README)"
 		local s
 
 		tmpdirs="${tmpdirs} ${tmpdir}:${pam_dir}"
@@ -258,13 +258,13 @@
 			then
 				if pam_auth_isset "${s}" && [ -n "${auth}" ]
 				then
-					if echo "${auth}" | grep -q '^(+|^)' && \
+					if echo "${auth}" | egrep -q '^(+|^)' && \
 						! pam_service_configured "${pam_file}" "${auth}"
 					then
 						local index="$(get_auth_index "${pam_file}")"
 						__auth="-m "$(echo "${auth}" | sed -E "s|^\+|+${index}|")""
 
-					elif echo "${auth}" | grep -q '^-'
+					elif echo "${auth}" | egrep -q '^-'
 					then
 						__auth="-m "${auth}""
 					fi
@@ -274,13 +274,13 @@
 				fi
 				if pam_account_isset "${s}" && [ -n "${account}" ]
 				then
-					if echo "${account}" | grep -q '^(+|^)' && \
+					if echo "${account}" | egrep -q '^(+|^)' && \
 						! pam_service_configured "${pam_file}" "${account}"
 					then
 						local index="$(get_account_index "${pam_file}")"
 						__account="-m "$(echo "${account}" | sed -E "s|^\+|+${index}|")""
 
-					elif echo "${account}" | grep -q '^-'
+					elif echo "${account}" | egrep -q '^-'
 					then
 						__account="-m "${account}""
 					fi
@@ -290,13 +290,13 @@
 				fi
 				if pam_session_isset "${s}" && [ -n "${session}" ]
 				then
-					if echo "${session}" | grep -q '^(+|^)' && \
+					if echo "${session}" | egrep -q '^(+|^)' && \
 						! pam_service_configured "${pam_file}" "${session}"
 					then
 						local index="$(get_session_index "${pam_file}")"
 						__session="-m "$(echo "${session}" | sed -E "s|^\+|+${index}|")""
 
-					elif echo "${session}" | grep -q '^-'
+					elif echo "${session}" | egrep -q '^-'
 					then
 						__session="-m "${session}""
 					fi
@@ -306,13 +306,13 @@
 				fi
 				if pam_password_isset "${s}" && [ -n "${password}" ]
 				then
-					if echo "${password}" | grep -q '^(+|^)' && \
+					if echo "${password}" | egrep -q '^(+|^)' && \
 						! pam_service_configured "${pam_file}" "${password}"
 					then
 						local index="$(get_password_index "${pam_file}")"
 						__password="-m "$(echo "${password}" | sed -E "s|^\+|+${index}|")""
 
-					elif echo "${password}" | grep -q '^-'
+					elif echo "${password}" | egrep -q '^-'
 					then
 						__password="-m "${password}""
 					fi



More information about the Commits mailing list