summaryrefslogtreecommitdiffstats
path: root/package/base-files/files/etc/hotplug.d/iface/10-routes
diff options
context:
space:
mode:
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2008-12-22 02:21:25 +0000
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2008-12-22 02:21:25 +0000
commite713ba8d94869c77f944429988bb6edc8556a4f5 (patch)
tree3ce5f3763f65454b7009c5c0464bd044ac608b28 /package/base-files/files/etc/hotplug.d/iface/10-routes
parent2e98a06d146190e2c99f3f1ab5767733927f8d02 (diff)
allow ipv4 routes without gateway in configuration
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13714 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/base-files/files/etc/hotplug.d/iface/10-routes')
-rw-r--r--package/base-files/files/etc/hotplug.d/iface/10-routes6
1 files changed, 4 insertions, 2 deletions
diff --git a/package/base-files/files/etc/hotplug.d/iface/10-routes b/package/base-files/files/etc/hotplug.d/iface/10-routes
index dd6ae5088..0eb92870f 100644
--- a/package/base-files/files/etc/hotplug.d/iface/10-routes
+++ b/package/base-files/files/etc/hotplug.d/iface/10-routes
@@ -27,7 +27,8 @@ add_route() {
dest="${netmask:+-net "$target" netmask "$netmask"}"
dest="${dest:--host "$target"}"
- /sbin/route add $dest gw "$gateway" ${dev:+dev "$dev"} ${metric:+ metric "$metric"}
+ /sbin/route add $dest ${gateway:+gw "$gateway"} \
+ ${dev:+dev "$dev"} ${metric:+ metric "$metric"}
}
add_route6() {
@@ -54,7 +55,8 @@ add_route6() {
config_get gateway "$interface" gateway
}
- /sbin/route -A inet6 add $target ${gateway:+gw "$gateway"} ${dev:+dev "$dev"} ${metric:+ metric "$metric"}
+ /sbin/route -A inet6 add $target ${gateway:+gw "$gateway"} \
+ ${dev:+dev "$dev"} ${metric:+ metric "$metric"}
}
case "$ACTION" in