If nova.conf doesn't exist, mute error generated by grep.
Closes-Bug: #1239044
Change-Id: Ia497e2a9d8395cc11850fb16fd4075af9855b2a5
| ... | ... |
@@ -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 |