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 <mhuang@redhat.com>master
parent
3ae03005b8
commit
c440d302f1
|
|
@ -105,7 +105,7 @@ setup_net() {
|
||||||
# add static route
|
# add static route
|
||||||
for _p in $(getargs rd.route); do
|
for _p in $(getargs rd.route); do
|
||||||
route_to_var "$_p" || continue
|
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"}
|
ip route add "$route_mask" ${route_gw:+via "$route_gw"} ${route_dev:+dev "$route_dev"}
|
||||||
if strstr ":" "$route_mask"; then
|
if strstr ":" "$route_mask"; then
|
||||||
printf -- "%s\n" "$route_mask ${route_gw:+via $route_gw} ${route_dev:+dev $route_dev}" \
|
printf -- "%s\n" "$route_mask ${route_gw:+via $route_gw} ${route_dev:+dev $route_dev}" \
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue