summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-07-08 13:48:01 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-07-08 14:12:44 -0700
commit4841cd902800ca500e34c5fd60b9a24227c22591 (patch)
treeec841d025e5c942f745167987ebaa545939610e1 /templates
parentd9c9ba9d78513bd98c16d10eb1e65514929ebdc9 (diff)
downloadvyatta-cfg-quagga-4841cd902800ca500e34c5fd60b9a24227c22591.tar.gz
vyatta-cfg-quagga-4841cd902800ca500e34c5fd60b9a24227c22591.zip
Change gateway-address from static to kernel route
Bug 4228 Need gateway-address to overide DHCP provided address so set as a kernel not static route.
Diffstat (limited to 'templates')
-rw-r--r--templates/system/gateway-address/node.def10
1 files changed, 2 insertions, 8 deletions
diff --git a/templates/system/gateway-address/node.def b/templates/system/gateway-address/node.def
index e5764c0c..bae1972a 100644
--- a/templates/system/gateway-address/node.def
+++ b/templates/system/gateway-address/node.def
@@ -1,12 +1,6 @@
type: ipv4
help: Set default gateway
-create: vyatta-vtysh -c "configure terminal" -c "ip route 0.0.0.0/0 $VAR(@)"
-update: oldgw=`/opt/vyatta/sbin/vyatta-cli-expand-var.pl '$(/system/gateway-address/@)'`
- if [ -n "$oldgw" ]; then
- vyatta-vtysh --noerror -c "configure terminal" \
- -c "no ip route 0.0.0.0/0 $oldgw"
- fi
- vyatta-vtysh -c "configure terminal" -c "ip route 0.0.0.0/0 $VAR(@)"
+update: sudo ip route replace to default via $VAR(@)
delete: if ${vyatta_sbindir}/vyatta-gateway-static_route-check.pl "$VAR(@)"
- then vyatta-vtysh -c "configure terminal" -c "no ip route 0.0.0.0/0 $VAR(@)"
+ then sudo ip route delete to default via $VAR(@)
fi