diff options
author | Daniil Baturin <daniil@baturin.org> | 2014-04-12 07:36:48 -0700 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2014-04-12 07:36:48 -0700 |
commit | 65289163fce66a7d6a55a97a9510a5323d71315f (patch) | |
tree | dca66c93488fe906aac689684ecf0e1b50dd6dfe /templates | |
parent | c8bac72d3ce7feb29d86b87947cf8ac626e843a9 (diff) | |
download | vyatta-cfg-system-65289163fce66a7d6a55a97a9510a5323d71315f.tar.gz vyatta-cfg-system-65289163fce66a7d6a55a97a9510a5323d71315f.zip |
Bug #170: Set default wait time to 0.
Diffstat (limited to 'templates')
-rw-r--r-- | templates/interfaces/l2tpv3/node.def | 15 | ||||
-rw-r--r-- | templates/interfaces/l2tpv3/node.tag/wait/node.def | 6 |
2 files changed, 12 insertions, 9 deletions
diff --git a/templates/interfaces/l2tpv3/node.def b/templates/interfaces/l2tpv3/node.def index d609cb65..134a5c02 100644 --- a/templates/interfaces/l2tpv3/node.def +++ b/templates/interfaces/l2tpv3/node.def @@ -27,12 +27,15 @@ begin: fi create: - for i in `seq 1 $VAR(./wait/@)` - do - ping -c 1 $VAR(./remote-ip/@) > /dev/null 2>&1 && break - sleep 1 - done - ip l2tp add tunnel tunnel_id $VAR(./tunnel-id/@) peer_tunnel_id $VAR(./peer-tunnel-id/@) udp_sport $VAR(./sport/@) udp_dport $VAR(./dport/@) encap $VAR(./encap/@) local $VAR(./local-ip/@) remote $VAR(./remote-ip/@) || + WAIT_COUNT=$VAR(./wait/@) + if [ $WAIT_COUNT != 0 ]; then + for i in `seq 1 $VAR(./wait/@)` + do + ping -c 1 $VAR(./remote-ip/@) > /dev/null 2>&1 && break + sleep 1 + done + fi + ip l2tp add tunnel tunnel_id $VAR(./tunnel-id/@) peer_tunnel_id $VAR(./peer-tunnel-id/@) udp_sport $VAR(./source-port/@) udp_dport $VAR(./destination-port/@) encap $VAR(./encapsulation/@) local $VAR(./local-ip/@) remote $VAR(./remote-ip/@) || echo "ip l2tp add tunnel tunnel_id $VAR(./tunnel-id/@) peer_tunnel_id $VAR(./peer-tunnel-id/@) udp_sport $VAR(./sport/@) udp_dport $VAR(./dport/@) encap $VAR(./encap/@) local $VAR(./local-ip/@) remote $VAR(./remote-ip/@)" ip l2tp add session tunnel_id $VAR(./tunnel-id/@) session_id $VAR(./session-id/@) peer_session_id $VAR(./peer-session-id/@) || echo "ip l2tp add session tunnel_id $VAR(./tunnel-id/@) session_id $VAR(./session-id/@) peer_session_id $VAR(./peer-session-id/@)" diff --git a/templates/interfaces/l2tpv3/node.tag/wait/node.def b/templates/interfaces/l2tpv3/node.tag/wait/node.def index 53044eea..b308aca3 100644 --- a/templates/interfaces/l2tpv3/node.tag/wait/node.def +++ b/templates/interfaces/l2tpv3/node.tag/wait/node.def @@ -1,6 +1,6 @@ help: Wait count type: u32 -default: 30 -syntax:expression: ($VAR(@) >= 5 && $VAR(@) <= 300) ; "must be in the range 5 to 300 seconds" +default: 0 +syntax:expression: ($VAR(@) >= 0 && $VAR(@) <= 300) ; "must be in the range 0 to 300 seconds" -val_help: u32:5-300 wait (default 30) +val_help: u32:0-300 wait (default 0) |