From f43f3a59c26979f40510b7531b587b029088c871 Mon Sep 17 00:00:00 2001 From: DennyZhang Date: Fri, 11 Oct 2013 23:09:47 -0500 Subject: [PATCH] ./stack.sh complain no /etc/nova/nova.conf If nova.conf doesn't exist, mute error generated by grep. Closes-Bug: #1239044 Change-Id: Ia497e2a9d8395cc11850fb16fd4075af9855b2a5 --- functions | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/functions b/functions index 01e2dfc8fd..eca0f9be16 100644 --- a/functions +++ b/functions @@ -697,7 +697,8 @@ function iniset() { local section=$2 local option=$3 local value=$4 - if ! grep -q "^\[$section\]" "$file"; then + + if ! grep -q "^\[$section\]" "$file" 2>/dev/null; then # Add section at the end echo -e "\n[$section]" >>"$file" fi