summaryrefslogtreecommitdiff
path: root/templates/system
diff options
context:
space:
mode:
Diffstat (limited to 'templates/system')
-rw-r--r--templates/system/gateway-address/node.def3
1 files changed, 2 insertions, 1 deletions
diff --git a/templates/system/gateway-address/node.def b/templates/system/gateway-address/node.def
index 6a77c0a5..87416e8c 100644
--- a/templates/system/gateway-address/node.def
+++ b/templates/system/gateway-address/node.def
@@ -4,5 +4,6 @@ create:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\"
update:expression: "oldgw=`/opt/vyatta/sbin/vyatta-cli-expand-var.pl '$(/system/gateway-address/@)' ` && \
${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"no ip route 0.0.0.0/0 $oldgw \" && \
${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"ip route 0.0.0.0/0 $VAR(@)\" "
-delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"no ip route 0.0.0.0/0 $VAR(@)\" "
+delete:expression: "if ${vyatta_sbindir}/vyatta-gateway-static_route-check.pl \"$VAR(@)\"; then \
+ ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"no ip route 0.0.0.0/0 $VAR(@)\"; fi"