ifcfg: Quote left-hand side of [ ] expression

This prevents word-splitting and therefore leads to more accurate error
message in case 'grep -c' prints something other than a number.

Signed-off-by: Phil Sutter <phil@nwl.cc>
This commit is contained in:
Phil Sutter 2017-08-17 19:09:32 +02:00 committed by Stephen Hemminger
parent 2313b6bfe4
commit 1e3197e0fd
1 changed files with 1 additions and 1 deletions

View File

@ -131,7 +131,7 @@ noarp=$?
ip route add unreachable 224.0.0.0/24 >& /dev/null
ip route add unreachable 255.255.255.255 >& /dev/null
if [ `ip link ls $dev | grep -c MULTICAST` -ge 1 ]; then
if [ "`ip link ls $dev | grep -c MULTICAST`" -ge 1 ]; then
ip route add 224.0.0.0/4 dev $dev scope global >& /dev/null
fi