From cedae2e49e7bc7502e468d8d9c562a3f0fbe50fd Mon Sep 17 00:00:00 2001 From: Chris PeBenito Date: Tue, 28 Jun 2005 17:31:50 +0000 Subject: [PATCH] better handling of whitespace --- refpolicy/support/set_tunables | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/refpolicy/support/set_tunables b/refpolicy/support/set_tunables index 81b0156e..0adbc1a5 100755 --- a/refpolicy/support/set_tunables +++ b/refpolicy/support/set_tunables @@ -3,5 +3,6 @@ # this file exists because this line is # too hard to escape correctly in a makefile -egrep -v '^[[:blank:]]*(\#.*)?$' $1 \ - | awk '{ print "define(`"$1"_conf'\'',`"$3"'\'')" }' +if test -f $1; then + awk -F = '/^[[:blank:]]*[[:alpha:]]+/{ gsub(/[[:blank:]]*/,"") ; print "define(`"$1"_conf'\'',`"$2"'\'')" }' $1 +fi