From: Felix Fietkau Date: Thu, 15 Mar 2012 09:46:22 +0000 (+0100) Subject: shell: support routes without gateway X-Git-Url: http://git.archive.openwrt.org/?a=commitdiff_plain;ds=sidebyside;h=15bf3d441fd429f2b6ff18cc0c351ac8d3dd655f;p=project%2Fnetifd.git shell: support routes without gateway --- diff --git a/dummy/netifd-proto.sh b/dummy/netifd-proto.sh index 69aa27d..7482a83 100755 --- a/dummy/netifd-proto.sh +++ b/dummy/netifd-proto.sh @@ -127,7 +127,7 @@ _proto_push_route() { json_add_object "" json_add_string target "$target" json_add_string netmask "$mask" - json_add_string gateway "$gw" + [ -n "$gw" ] && json_add_string gateway "$gw" json_close_object }