./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
diff --git a/functions b/functions
index 01e2dfc..eca0f9b 100644
--- a/functions
+++ b/functions
@@ -697,7 +697,8 @@
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