diff options
Diffstat (limited to 'templates/protocols/static/route')
-rw-r--r-- | templates/protocols/static/route/node.tag/dhcp-interface/node.def | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/templates/protocols/static/route/node.tag/dhcp-interface/node.def b/templates/protocols/static/route/node.tag/dhcp-interface/node.def index 4942bf5f..3952233d 100644 --- a/templates/protocols/static/route/node.tag/dhcp-interface/node.def +++ b/templates/protocols/static/route/node.tag/dhcp-interface/node.def @@ -7,13 +7,17 @@ allowed: create: sudo /opt/vyatta/sbin/vyatta-update-static-route.pl --interface=$VAR(@) --route=$VAR(../@) --table=main --option=create RIP=$(/opt/vyatta/sbin/vyatta-dhcp-helper.pl --interface=$VAR(@) --want=router) - vtysh -c "configure terminal" \ - -c "ip route $VAR(../@) $RIP" + if [ "$RIP" != "127.0.0.1" ]; then + vtysh -c "configure terminal" \ + -c "ip route $VAR(../@) $RIP" + fi update: sudo /opt/vyatta/sbin/vyatta-update-static-route.pl --interface=$VAR(@) --route=$VAR(../@) --table=main --option=create RIP=$(/opt/vyatta/sbin/vyatta-dhcp-helper.pl --interface=$VAR(@) --want=router) - vtysh -c "configure terminal" \ - -c "ip route $VAR(../@) $RIP" + if [ "$RIP" != "127.0.0.1" ]; then + vtysh -c "configure terminal" \ + -c "ip route $VAR(../@) $RIP" + fi delete: sudo /opt/vyatta/sbin/vyatta-update-static-route.pl --interface=$VAR(@) --route=$VAR(../@) --table=main --option=delete RIP=$(/opt/vyatta/sbin/vyatta-dhcp-helper.pl --interface=$VAR(@) --want=router) |