From: Phil Sutter Date: Thu, 17 Aug 2017 17:09:32 +0000 (+0200) Subject: ifcfg: Quote left-hand side of [ ] expression X-Git-Tag: v4.13.0~72 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e3197e0fdbf299fe24cdba7c0d613317ed82063;p=thirdparty%2Fiproute2.git 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 --- diff --git a/ip/ifcfg b/ip/ifcfg index 083d9df36..30a2dc498 100644 --- a/ip/ifcfg +++ b/ip/ifcfg @@ -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