From e39ced239b8e84ff46758cb4ec6cffcd403088a2 Mon Sep 17 00:00:00 2001 From: John Southworth Date: Mon, 10 Oct 2011 18:40:33 -0500 Subject: Fix up completion for 'monitor firewall' --- templates/monitor/firewall/ipv6-name/node.tag/node.def | 5 +++-- templates/monitor/firewall/ipv6-name/node.tag/rule/node.tag/node.def | 5 +++-- templates/monitor/firewall/name/node.tag/node.def | 5 +++-- templates/monitor/firewall/name/node.tag/rule/node.tag/node.def | 5 +++-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/templates/monitor/firewall/ipv6-name/node.tag/node.def b/templates/monitor/firewall/ipv6-name/node.tag/node.def index 3082c29..dfd71e8 100644 --- a/templates/monitor/firewall/ipv6-name/node.tag/node.def +++ b/templates/monitor/firewall/ipv6-name/node.tag/node.def @@ -1,4 +1,5 @@ help: Monitor a specified firewall -allowed: local -a ARR=$(cli-shell-api -- listEffectiveNodes firewall ipv6-name) - echo "${ARR[@]}" +allowed: local -a ARR + eval "ARR=($(cli-shell-api -- listEffectiveNodes firewall ipv6-name))" + echo ${ARR[@]} run: ${vyatta_bindir}/vyatta-monitor Firewall-ipv6-$4 "\[$4-[0-9]*-[A,D,R]\]" diff --git a/templates/monitor/firewall/ipv6-name/node.tag/rule/node.tag/node.def b/templates/monitor/firewall/ipv6-name/node.tag/rule/node.tag/node.def index 991a285..0c1ecb6 100644 --- a/templates/monitor/firewall/ipv6-name/node.tag/rule/node.tag/node.def +++ b/templates/monitor/firewall/ipv6-name/node.tag/rule/node.tag/node.def @@ -1,4 +1,5 @@ help: Monitor a rule in the specified firewall -allowed: local -a ARR=$(cli-shell-api -- listEffectiveNodes firewall ipv6-name ${COMP_WORDS[3]} rule) - echo "${ARR[@]}" +allowed: local -a ARR + eval "ARR=($(cli-shell-api -- listEffectiveNodes firewall ipv6-name ${COMP_WORDS[3]} rule))" + echo ${ARR[@]} run: ${vyatta_bindir}/vyatta-monitor Firewall-ipv6-$4-rule-$6 "\[$4-$6-[A,D,R]\]" diff --git a/templates/monitor/firewall/name/node.tag/node.def b/templates/monitor/firewall/name/node.tag/node.def index 3bb9d7f..4b31405 100644 --- a/templates/monitor/firewall/name/node.tag/node.def +++ b/templates/monitor/firewall/name/node.tag/node.def @@ -1,4 +1,5 @@ help: Monitor a specified firewall -allowed: local -a ARR=$(cli-shell-api -- listEffectiveNodes firewall name) - echo "${ARR[@]}" +allowed: local -a ARR + eval "ARR=($(cli-shell-api -- listEffectiveNodes firewall name))" + echo ${ARR[@]} run: ${vyatta_bindir}/vyatta-monitor Firewall-$4 "\[$4-[0-9]*-[A,D,R]\]" diff --git a/templates/monitor/firewall/name/node.tag/rule/node.tag/node.def b/templates/monitor/firewall/name/node.tag/rule/node.tag/node.def index ccd865d..7f15ed0 100644 --- a/templates/monitor/firewall/name/node.tag/rule/node.tag/node.def +++ b/templates/monitor/firewall/name/node.tag/rule/node.tag/node.def @@ -1,4 +1,5 @@ help: Monitor a rule in the specified firewall -allowed: local -a ARR=$(cli-shell-api -- listEffectiveNodes firewall name ${COMP_WORDS[3]} rule) - echo "${ARR[@]}" +allowed: local -a ARR + eval "ARR=($(cli-shell-api -- listEffectiveNodes firewall name ${COMP_WORDS[3]} rule))" + echo ${ARR[@]} run: ${vyatta_bindir}/vyatta-monitor Firewall-$4-rule-$6 "\[$4-$6-[A,D,R]\]" -- cgit v1.2.3