]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
40network: Fix the syntax to correct the judgment sentence
authorMinfei Huang <mhuang@redhat.com>
Mon, 1 Dec 2014 04:37:06 +0000 (12:37 +0800)
committerHarald Hoyer <harald@redhat.com>
Mon, 1 Dec 2014 16:02:15 +0000 (17:02 +0100)
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 <mhuang@redhat.com>
modules.d/40network/net-lib.sh

index 48e70141d5b4cf7343eeb4aa7ffb0d48ef1cc4c3..d9c5a1db9deabaf8e2700a859449c2819ac0cc41 100755 (executable)
@@ -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}" \