From db09c6ae4773ce8b4ff6fc88361e33d94925bfc4 Mon Sep 17 00:00:00 2001 From: Kelven Yang Date: Tue, 26 Jul 2011 10:38:27 -0700 Subject: [PATCH] bug 10855: the issue is caused by expanding content that has space inside at sub-shell, use back quote substitution to enforce the correct shell macro expansion --- patches/systemvm/debian/config/root/userdata.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/patches/systemvm/debian/config/root/userdata.sh b/patches/systemvm/debian/config/root/userdata.sh index 475bc81b439..6efdb13c221 100644 --- a/patches/systemvm/debian/config/root/userdata.sh +++ b/patches/systemvm/debian/config/root/userdata.sh @@ -42,9 +42,11 @@ create_htaccess() { htaccessFile=$htaccessFolder/.htaccess mkdir -p $htaccessFolder touch $htaccessFile - grep -w $file $htaccessFile - - if [ $? -gt 0 ]; then + + #grep -w $file $htaccessFile + grep -F `echo $entry` $htaccessFile + + if [ \$? -gt 0 ]; then echo -e $entry >> $htaccessFile; fi result=$?