From 0c48fc3880551d862063e56a029ce43082df376a Mon Sep 17 00:00:00 2001 From: SiemKorteweg Date: Sat, 10 Oct 2015 13:25:14 +0200 Subject: Optimized use of cat, grep and awk. Detection of duplicate entries in /etc/hosts is now more robust. On CentOS7 the SERVICE_MANAGER is detected correctly. --- include/tests_storage_nfs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/tests_storage_nfs') diff --git a/include/tests_storage_nfs b/include/tests_storage_nfs index 1795aeb6..9f245a9a 100644 --- a/include/tests_storage_nfs +++ b/include/tests_storage_nfs @@ -118,7 +118,7 @@ logtext "Test: check /etc/exports" if [ -f /etc/exports ]; then logtext "Result: /etc/exports exists" - FIND=`cat /etc/exports | grep -v "^$" | grep -v "^#" | sed 's/ /!space!/g'` + FIND=`grep -v "^$" /etc/exports | grep -v "^#" | sed 's/ /!space!/g'` if [ ! "${FIND}" = "" ]; then for I in ${FIND}; do I=`echo ${I} | sed 's/!space!/ /g'` -- cgit v1.2.3