From: Minfei Huang Date: Mon, 1 Dec 2014 04:37:06 +0000 (+0800) Subject: 40network: Fix the syntax to correct the judgment sentence X-Git-Tag: 041~76 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c440d302f1cdfc0336e9086c7b9016356f961936;p=thirdparty%2Fdracut.git 40network: Fix the syntax to correct the judgment sentence In the judgment sentence, it will print the following warning message, becasuse of lacking the blank on the left of ']'. /lib/net-lib.sh: line 110: [: missing `]' Signed-off-by: Minfei Huang --- diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh index 48e70141d..d9c5a1db9 100755 --- a/modules.d/40network/net-lib.sh +++ b/modules.d/40network/net-lib.sh @@ -105,7 +105,7 @@ setup_net() { # add static route for _p in $(getargs rd.route); do route_to_var "$_p" || continue - [ -n "$route_dev" ] && [ "$route_dev" != "$netif"] && continue + [ -n "$route_dev" ] && [ "$route_dev" != "$netif" ] && continue ip route add "$route_mask" ${route_gw:+via "$route_gw"} ${route_dev:+dev "$route_dev"} if strstr ":" "$route_mask"; then printf -- "%s\n" "$route_mask ${route_gw:+via $route_gw} ${route_dev:+dev $route_dev}" \