]> 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>
Tue, 13 Jan 2015 11:49:32 +0000 (12:49 +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>
(cherry picked from commit c440d302f1cdfc0336e9086c7b9016356f961936)

modules.d/40network/net-lib.sh

index f0850207d86578d28d943556c1a69d4df2c3e252..9c6b9dae367fe984775b7faba0c293cf1044d7ac 100755 (executable)
@@ -107,7 +107,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}" \