diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-11-22 11:25:19 -0800 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-11-22 11:25:19 -0800 |
commit | 5b516cbeb01c86707f2bbfe2bcab4b9eca6800be (patch) | |
tree | 6806ab0b0492d9c51d487ae762900ffc9f9974fd | |
parent | 39a799dac616edd4b42a1b4de2c861f248318e1f (diff) | |
download | vyatta-cfg-quagga-5b516cbeb01c86707f2bbfe2bcab4b9eca6800be.tar.gz vyatta-cfg-quagga-5b516cbeb01c86707f2bbfe2bcab4b9eca6800be.zip |
Optimize lookup of local ip on tunnels
Speeds up boot with lots of tunnels
-rw-r--r-- | templates/interfaces/tunnel/node.tag/local-ip/node.def | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/templates/interfaces/tunnel/node.tag/local-ip/node.def b/templates/interfaces/tunnel/node.tag/local-ip/node.def index ea11f6e1..809c4c6f 100644 --- a/templates/interfaces/tunnel/node.tag/local-ip/node.def +++ b/templates/interfaces/tunnel/node.tag/local-ip/node.def @@ -2,9 +2,8 @@ type: ipv4 help: Local IP address for this tunnel [REQUIRED] syntax:expression: exec \ - "if [ -z \"`ip addr list | grep $VAR(@) `\" ]; then \ - echo Warning! IP address $VAR(@) doesn\\'t exist on this system ; \ - fi ; " + "/opt/vyatta/sbin/local_ip $VAR(@) || \ + echo Warning! IP address $VAR(@) doesn\\'t exist on this system" create:expression: "true" update:expression: "false" ; \ |