From b06af0f993baafd0eaf49249ea08a1db015f500b Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Mon, 26 Sep 2011 18:17:49 +0700 Subject: Bug 7353: Fix completion for NAT rule protocol option --- templates-cfg/nat/destination/rule/node.tag/protocol/node.def | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'templates-cfg/nat/destination/rule') diff --git a/templates-cfg/nat/destination/rule/node.tag/protocol/node.def b/templates-cfg/nat/destination/rule/node.tag/protocol/node.def index 882581d..2655306 100644 --- a/templates-cfg/nat/destination/rule/node.tag/protocol/node.def +++ b/templates-cfg/nat/destination/rule/node.tag/protocol/node.def @@ -13,3 +13,10 @@ syntax:expression: exec "if [ -n \"`/opt/vyatta/sbin/vyatta-validate-type.pl pro echo invalid protocol \"$VAR(@)\" ; \ exit 1 ; \ fi ; " + +# Provide some help for command completion. Doesn't return negated +# values or protocol numbers +allowed: + protos=`cat /etc/protocols | sed -e '/^#.*/d' | awk '{ print $1 }' | grep -v 'v6'` + protos="all $protos tcp_udp" + echo -n $protos -- cgit v1.2.3