Test expression fixed.

Using test statement [...] was wrong for this type of check.

Change-Id: Ie6640189206084c89f665478d93ef2444afcfd5b
Fixes: MRN-903
This commit is contained in:
Dmitry Teselkin 2013-08-30 15:31:42 +04:00
parent df201fd6b5
commit d3fff70d29
1 changed files with 1 additions and 1 deletions

View File

@ -47,7 +47,7 @@ function iniset {
sed -i -e "s/^\($option[ \t]*=[ \t]*\).*$/\1$value/" "$file"
else
# Check if section already exists
if [ ! $(grep -q "^\[$section\]" "$file") ]; then
if ! grep -q "^\[$section\]" "$file" ; then
# Add section at the end
echo -e "\n[$section]" >>"$file"
fi