diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-12-15 16:07:20 -0800 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-12-15 16:07:20 -0800 |
commit | 7c4cf0788d1a10164504791c614c46e807c769ce (patch) | |
tree | ebfdff838c691d24b533e0580c98b9b075c36789 | |
parent | a9d5c1c389102c62390d1355c7aca597d3c71b33 (diff) | |
parent | bfb79fae51932334916ee52681a39b29488bc38f (diff) | |
download | vyatta-cfg-quagga-7c4cf0788d1a10164504791c614c46e807c769ce.tar.gz vyatta-cfg-quagga-7c4cf0788d1a10164504791c614c46e807c769ce.zip |
Merge branch 'jenner' of 192.168.1.12:git/vyatta-cfg-quagga into jenner
-rw-r--r-- | templates/protocols/static/interface-route/node.tag/next-hop-interface/node.def | 35 | ||||
-rw-r--r-- | templates/protocols/static/interface-route6/node.tag/next-hop-interface/node.def | 35 |
2 files changed, 10 insertions, 60 deletions
diff --git a/templates/protocols/static/interface-route/node.tag/next-hop-interface/node.def b/templates/protocols/static/interface-route/node.tag/next-hop-interface/node.def index da7b7864..7582362d 100644 --- a/templates/protocols/static/interface-route/node.tag/next-hop-interface/node.def +++ b/templates/protocols/static/interface-route/node.tag/next-hop-interface/node.def @@ -1,36 +1,11 @@ -# -# Config template for -# protocols/static/interface-route/<prefix>/next-hop-interface -# - tag: - type: txt - help: Set the next-hop interface - -# -# Argument must be the name of an interface on the system. PPP interfaces -# only come into existance when they come up. Allow interface routes -# via them to be configured even though the link may not be up right now. -# We need a special case for multilink interfaces because their names -# are not coded into the name of the PPP config file in /etc/ppp/peers. -# -syntax:expression: exec " \ - IFNAME=$VAR(@) ; \ - if [ ! -e /sys/class/net/$IFNAME ]; then \ - if [ \"${IFNAME::5}\" != \"pppoa\" -a \"${IFNAME::5}\" != \"pppoe\" \ - -a \"${IFNAME::3}\" != \"wan\" \ - -a \"${IFNAME::2}\" != \"ml\" ]; then \ - echo interface $IFNAME doesn\\'t exist on this system ; \ - exit 1 ; \ - fi ; \ - if [ ! -e /etc/ppp/peers/${IFNAME} -a \"$IFNAME\" != \"ml0\" \ - -a \"$IFNAME\" != \"ml1\" ]; then \ - echo PPP interface $IFNAME doesn\\'t exist on this system ; \ - exit 1 ; \ - fi ; \ - fi ; " +# show all current interface +# but syntax accepts any interface since it may exist later (ppp etc) +allowed: local -a array + array=( /sys/class/net/* ) + echo -n ${array[@]##*/} delete: touch /tmp/static.$PPID diff --git a/templates/protocols/static/interface-route6/node.tag/next-hop-interface/node.def b/templates/protocols/static/interface-route6/node.tag/next-hop-interface/node.def index 981201b3..5321c619 100644 --- a/templates/protocols/static/interface-route6/node.tag/next-hop-interface/node.def +++ b/templates/protocols/static/interface-route6/node.tag/next-hop-interface/node.def @@ -1,36 +1,11 @@ -# -# Config template for -# protocols/static/interface-route6/<prefix>/next-hop-interface -# - tag: - type: txt - help: Set the next-hop interface - -# -# Argument must be the name of an interface on the system. PPP interfaces -# only come into existance when they come up. Allow interface routes -# via them to be configured even though the link may not be up right now. -# We need a special case for multilink interfaces because their names -# are not coded into the name of the PPP config file in /etc/ppp/peers. -# -syntax:expression: exec " \ - IFNAME=$VAR(@) ; \ - if [ ! -e /sys/class/net/$IFNAME ]; then \ - if [ \"${IFNAME::5}\" != \"pppoa\" -a \"${IFNAME::5}\" != \"pppoe\" \ - -a \"${IFNAME::3}\" != \"wan\" \ - -a \"${IFNAME::2}\" != \"ml\" ]; then \ - echo interface $IFNAME doesn\\'t exist on this system ; \ - exit 1 ; \ - fi ; \ - if [ ! -e /etc/ppp/peers/${IFNAME} -a \"$IFNAME\" != \"ml0\" \ - -a \"$IFNAME\" != \"ml1\" ]; then \ - echo PPP interface $IFNAME doesn\\'t exist on this system ; \ - exit 1 ; \ - fi ; \ - fi ; " +# show all current interface +# but syntax accepts any interface since it may exist later (ppp etc) +allowed: local -a array + array=( /sys/class/net/* ) + echo -n ${array[@]##*/} delete: touch /tmp/static.$PPID |