Browse code

./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

DennyZhang authored on 2013/10/12 13:09:47
Showing 1 changed files
... ...
@@ -697,7 +697,8 @@ function iniset() {
697 697
     local section=$2
698 698
     local option=$3
699 699
     local value=$4
700
-    if ! grep -q "^\[$section\]" "$file"; then
700
+
701
+    if ! grep -q "^\[$section\]" "$file" 2>/dev/null; then
701 702
         # Add section at the end
702 703
         echo -e "\n[$section]" >>"$file"
703 704
     fi