summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Grennan <tgrennan@vyatta.com>2007-10-04 18:10:03 -0700
committerTom Grennan <tgrennan@vyatta.com>2007-10-04 18:10:03 -0700
commitfd141a3ac06bdbf52f38a7be6d72a392d951b67d (patch)
tree9b12acf4edb302409d161c7a70f00f75215a0bf2
parentef21466f9202fe7406cd07f22838a7a349fde4ef (diff)
downloadvyatta-op-fd141a3ac06bdbf52f38a7be6d72a392d951b67d.tar.gz
vyatta-op-fd141a3ac06bdbf52f38a7be6d72a392d951b67d.zip
don't eval help string; so, no longer needs to be quoted in node.def files
-rw-r--r--etc/bash_completion.d/vyatta-op8
-rw-r--r--templates/configure/node.def2
-rw-r--r--templates/set/date/node.def2
-rw-r--r--templates/set/date/node.tag/node.def2
-rw-r--r--templates/set/date/ntp/node.def2
-rw-r--r--templates/set/date/ntp/node.tag/node.def2
-rw-r--r--templates/set/node.tag/node.def2
-rw-r--r--templates/show/date/node.def2
-rw-r--r--templates/show/date/utc/node.def2
-rw-r--r--templates/show/interfaces/ethernet/node.def2
-rw-r--r--templates/show/interfaces/ethernet/node.tag/node.def2
-rw-r--r--templates/show/interfaces/ethernet/node.tag/physical/node.def2
-rw-r--r--templates/show/interfaces/ethernet/node.tag/vif/node.def2
-rw-r--r--templates/show/interfaces/ethernet/node.tag/vif/node.tag/node.def2
-rw-r--r--templates/show/interfaces/ethernet/node.tag/vif/node.tag/physical/node.def2
-rw-r--r--templates/show/interfaces/loopback/node.def2
-rw-r--r--templates/show/interfaces/loopback/node.tag/node.def2
-rw-r--r--templates/show/interfaces/node.def2
-rw-r--r--templates/show/interfaces/system/enabled/node.def2
-rw-r--r--templates/show/interfaces/system/node.def2
-rw-r--r--templates/show/interfaces/tunnel/node.def2
-rw-r--r--templates/show/interfaces/tunnel/node.tag/node.def2
-rw-r--r--templates/show/node.def2
-rw-r--r--templates/show/ntp/node.def2
-rw-r--r--templates/show/ntp/node.tag/node.def2
-rw-r--r--templates/show/system/boot-messages/node.def2
-rw-r--r--templates/show/system/connections/node.def2
-rw-r--r--templates/show/system/kernel-messages/node.def2
-rw-r--r--templates/show/system/memory/node.def2
-rw-r--r--templates/show/system/node.def2
-rw-r--r--templates/show/system/processes/node.def2
-rw-r--r--templates/show/system/processes/summary/node.def2
-rw-r--r--templates/show/system/storage/node.def2
-rw-r--r--templates/show/version/node.def2
-rw-r--r--templates/terminal/length/node.def2
-rw-r--r--templates/terminal/no/length/node.def2
-rw-r--r--templates/terminal/no/node.def2
-rw-r--r--templates/terminal/node.def2
38 files changed, 41 insertions, 41 deletions
diff --git a/etc/bash_completion.d/vyatta-op b/etc/bash_completion.d/vyatta-op
index 0175528..10d65e4 100644
--- a/etc/bash_completion.d/vyatta-op
+++ b/etc/bash_completion.d/vyatta-op
@@ -225,9 +225,9 @@ _vyatta_op_print_help ()
echo -en "\nPossible completions:"
for (( idx = 0 ; idx < ${#comps[@]} ; idx++ )) ; do
if [ ${#comps[idx]} -lt $taglen ] ; then
- printf "\n %-${taglen}s\t%s" "${comps[idx]}" "${helps[idx]}"
+ printf "\n %-${taglen}s\t%b" "${comps[idx]}" "${helps[idx]}"
else
- printf "\n %s\n\t\t%s" "${comps[idx]}" "${helps[idx]}"
+ printf "\n %s\n\t\t%b" "${comps[idx]}" "${helps[idx]}"
fi
done
}
@@ -250,7 +250,7 @@ _vyatta_op_help ()
eval $restore_shopts
if [ -f $subtag ]; then
allowed=($( eval "$( _vyatta_op_get_node_def_field $subtag allowed )" ))
- eval help="$( _vyatta_op_get_node_def_field $subtag help )"
+ help=$( _vyatta_op_get_node_def_field $subtag help )
if [ ${#allowed[@]} -ne 0 ] ; then
for a in "${allowed[@]}"; do
hcomps+=( "$a" )
@@ -261,7 +261,7 @@ _vyatta_op_help ()
if [ ${#subnodes[@]} -ne 0 ] ; then
for n in ${subnodes[@]} ; do
- eval help="$( _vyatta_op_get_node_def_field $n help )"
+ help=$( _vyatta_op_get_node_def_field $n help )
subdir=${n%/node.def}
hcomps+=( "${subdir##*/}" )
hstrs+=( "$help" )
diff --git a/templates/configure/node.def b/templates/configure/node.def
index 09d0e4b..beae7cd 100644
--- a/templates/configure/node.def
+++ b/templates/configure/node.def
@@ -1,2 +1,2 @@
-help: "Enter configure mode"
+help: Enter configure mode
run: export _OFR_CONFIGURE=ok; newgrp quaggavty ; unset _OFR_CONFIGURE
diff --git a/templates/set/date/node.def b/templates/set/date/node.def
index 05aa096..517fdbf 100644
--- a/templates/set/date/node.def
+++ b/templates/set/date/node.def
@@ -1 +1 @@
-help: "Set date and time"
+help: Set date and time
diff --git a/templates/set/date/node.tag/node.def b/templates/set/date/node.tag/node.def
index 2698b04..f508bf3 100644
--- a/templates/set/date/node.tag/node.def
+++ b/templates/set/date/node.tag/node.def
@@ -1,3 +1,3 @@
-help: "Set date and time: MMDDhhmm[.ss]YYYY"
+help: Set date and time: MMDDhhmm[.ss]YYYY
allowed: echo -n --
run: sudo /bin/date $3
diff --git a/templates/set/date/ntp/node.def b/templates/set/date/ntp/node.def
index 2ce1577..a4370e3 100644
--- a/templates/set/date/ntp/node.def
+++ b/templates/set/date/ntp/node.def
@@ -1,2 +1,2 @@
-help: "Set system date and time by NTP server [default: ntp.vyatta.com]"
+help: Set system date and time by NTP server [default: ntp.vyatta.com]
run: sudo ntpdate ntp.vyatta.com
diff --git a/templates/set/date/ntp/node.tag/node.def b/templates/set/date/ntp/node.tag/node.def
index 7add4fa..f8be449 100644
--- a/templates/set/date/ntp/node.tag/node.def
+++ b/templates/set/date/ntp/node.tag/node.def
@@ -1,4 +1,4 @@
-help: "Set system date and time with given NTP server"
+help: Set system date and time with given NTP server
allowed: sed 's/#.*//; s/^[^ \t]*[ \t]//; /^$/d' ${HOSTFILE:-/dev/null} ;
echo --
run: sudo ntpdate ${4:-ntp.vyatta.com}
diff --git a/templates/set/node.tag/node.def b/templates/set/node.tag/node.def
index a89976a..dd11fb5 100644
--- a/templates/set/node.tag/node.def
+++ b/templates/set/node.tag/node.def
@@ -1,3 +1,3 @@
-help: "Bash builtin set command"
+help: Bash builtin set command
allowed: echo -n --
run: builtin $*
diff --git a/templates/show/date/node.def b/templates/show/date/node.def
index 10e01a3..eb5adf9 100644
--- a/templates/show/date/node.def
+++ b/templates/show/date/node.def
@@ -1,2 +1,2 @@
-help: "Show system date and time"
+help: Show system date and time
run: /bin/date
diff --git a/templates/show/date/utc/node.def b/templates/show/date/utc/node.def
index d24808f..cb12d00 100644
--- a/templates/show/date/utc/node.def
+++ b/templates/show/date/utc/node.def
@@ -1,2 +1,2 @@
-help: "Show system date and time as Coordinated Universal Time"
+help: Show system date and time as Coordinated Universal Time
run: /bin/date -u
diff --git a/templates/show/interfaces/ethernet/node.def b/templates/show/interfaces/ethernet/node.def
index 76e0990..9ece668 100644
--- a/templates/show/interfaces/ethernet/node.def
+++ b/templates/show/interfaces/ethernet/node.def
@@ -1,2 +1,2 @@
-help: "Show ethernet interface information"
+help: Show ethernet interface information
run: ${vyatta_bindir}/vyatta-show-interfaces ethernet
diff --git a/templates/show/interfaces/ethernet/node.tag/node.def b/templates/show/interfaces/ethernet/node.tag/node.def
index 09bd522..cf3e112 100644
--- a/templates/show/interfaces/ethernet/node.tag/node.def
+++ b/templates/show/interfaces/ethernet/node.tag/node.def
@@ -1,4 +1,4 @@
-help: "Show given ethernet interface information"
+help: Show given ethernet interface information
allowed: local -a array ;
array=( /sys/class/net/{eth,vmnet}* ) ;
echo -n ${array[@]##*/}
diff --git a/templates/show/interfaces/ethernet/node.tag/physical/node.def b/templates/show/interfaces/ethernet/node.tag/physical/node.def
index 9e907d1..0d4dcf1 100644
--- a/templates/show/interfaces/ethernet/node.tag/physical/node.def
+++ b/templates/show/interfaces/ethernet/node.tag/physical/node.def
@@ -1,3 +1,3 @@
-help: "Show physical device information of given ethernet interface"
+help: Show physical device information of given ethernet interface
allowed: ""
run: sudo ethtool $4
diff --git a/templates/show/interfaces/ethernet/node.tag/vif/node.def b/templates/show/interfaces/ethernet/node.tag/vif/node.def
index 66490a7..b3d92de 100644
--- a/templates/show/interfaces/ethernet/node.tag/vif/node.def
+++ b/templates/show/interfaces/ethernet/node.tag/vif/node.def
@@ -1,4 +1,4 @@
-help: "Show given virtual network interface information"
+help: Show given virtual network interface information
run: tput setaf ${COLOR_RED:-1} ;
echo error: need to supply vif # ;
tput op
diff --git a/templates/show/interfaces/ethernet/node.tag/vif/node.tag/node.def b/templates/show/interfaces/ethernet/node.tag/vif/node.tag/node.def
index a4dfe2b..68d3b02 100644
--- a/templates/show/interfaces/ethernet/node.tag/vif/node.tag/node.def
+++ b/templates/show/interfaces/ethernet/node.tag/vif/node.tag/node.def
@@ -1,4 +1,4 @@
-help: "Show given virtual network interface information"
+help: Show given virtual network interface information
allowed: for eth in /sys/class/net/eth${4}.* ; do
echo ${eth/*eth${4}./} ;
done
diff --git a/templates/show/interfaces/ethernet/node.tag/vif/node.tag/physical/node.def b/templates/show/interfaces/ethernet/node.tag/vif/node.tag/physical/node.def
index 7f6445f..96cd2a5 100644
--- a/templates/show/interfaces/ethernet/node.tag/vif/node.tag/physical/node.def
+++ b/templates/show/interfaces/ethernet/node.tag/vif/node.tag/physical/node.def
@@ -1,2 +1,2 @@
-help: "Show given virtual network interface pseudo-physical information"
+help: Show given virtual network interface pseudo-physical information
run: sudo ethtool $4.$6
diff --git a/templates/show/interfaces/loopback/node.def b/templates/show/interfaces/loopback/node.def
index 5394ff0..cbf6238 100644
--- a/templates/show/interfaces/loopback/node.def
+++ b/templates/show/interfaces/loopback/node.def
@@ -1,3 +1,3 @@
-help: "Show loopback interface information"
+help: Show loopback interface information
run: ${vyatta_bindir}/vyatta-show-interfaces loopback
diff --git a/templates/show/interfaces/loopback/node.tag/node.def b/templates/show/interfaces/loopback/node.tag/node.def
index 2b0ee55..f1c11ed 100644
--- a/templates/show/interfaces/loopback/node.tag/node.def
+++ b/templates/show/interfaces/loopback/node.tag/node.def
@@ -1,4 +1,4 @@
-help: "Show given loopback interface information"
+help: Show given loopback interface information
allowed: local -a array ;
array=( /sys/class/net/lo* ) ;
echo -n ${array[@]##*/}
diff --git a/templates/show/interfaces/node.def b/templates/show/interfaces/node.def
index 577db98..c898266 100644
--- a/templates/show/interfaces/node.def
+++ b/templates/show/interfaces/node.def
@@ -1,2 +1,2 @@
-help: "Show network interface information"
+help: Show network interface information
run: ${vyatta_bindir}/vyatta-show-interfaces
diff --git a/templates/show/interfaces/system/enabled/node.def b/templates/show/interfaces/system/enabled/node.def
index d48e1f2..26bf441 100644
--- a/templates/show/interfaces/system/enabled/node.def
+++ b/templates/show/interfaces/system/enabled/node.def
@@ -1,2 +1,2 @@
-help: "Show network information of all enabled interfaces"
+help: Show network information of all enabled interfaces
run: ${vyatta_bindir}/vyatta-show-interfaces system enabled
diff --git a/templates/show/interfaces/system/node.def b/templates/show/interfaces/system/node.def
index e5de242..138a159 100644
--- a/templates/show/interfaces/system/node.def
+++ b/templates/show/interfaces/system/node.def
@@ -1,2 +1,2 @@
-help: "Show network information of all interfaces"
+help: Show network information of all interfaces
run: ${vyatta_bindir}/vyatta-show-interfaces system
diff --git a/templates/show/interfaces/tunnel/node.def b/templates/show/interfaces/tunnel/node.def
index a2f5d1c..bfc03ba 100644
--- a/templates/show/interfaces/tunnel/node.def
+++ b/templates/show/interfaces/tunnel/node.def
@@ -1,3 +1,3 @@
-help: "Show tunnel interface information"
+help: Show tunnel interface information
run: ${vyatta_bindir}/vyatta-show-interfaces tunnel
diff --git a/templates/show/interfaces/tunnel/node.tag/node.def b/templates/show/interfaces/tunnel/node.tag/node.def
index 2bc5908..8dc252e 100644
--- a/templates/show/interfaces/tunnel/node.tag/node.def
+++ b/templates/show/interfaces/tunnel/node.tag/node.def
@@ -1,4 +1,4 @@
-help: "Show given tunnel interface information"
+help: Show given tunnel interface information
allowed: local -a array ;
array=( /sys/class/net/sit* ) ;
echo -n ${array[@]##*/}
diff --git a/templates/show/node.def b/templates/show/node.def
index 73e140d..4e7ed7a 100644
--- a/templates/show/node.def
+++ b/templates/show/node.def
@@ -1 +1 @@
-help: "Show system information"
+help: Show system information
diff --git a/templates/show/ntp/node.def b/templates/show/ntp/node.def
index bd75136..2a53d0a 100644
--- a/templates/show/ntp/node.def
+++ b/templates/show/ntp/node.def
@@ -1,2 +1,2 @@
-help: "Show date and time of network server [default: ntp.vyatta.com]"
+help: Show date and time of network server [default: ntp.vyatta.com]
run: ntpdate -q ntp.vyatta.com
diff --git a/templates/show/ntp/node.tag/node.def b/templates/show/ntp/node.tag/node.def
index 9d953fa..9ff0137 100644
--- a/templates/show/ntp/node.tag/node.def
+++ b/templates/show/ntp/node.tag/node.def
@@ -1,4 +1,4 @@
-help: "Show date and time of given NTP server"
+help: Show date and time of given NTP server
allowed: sed 's/#.*//; s/^[^ \t]*[ \t]//; /^$/d' ${HOSTFILE:-/dev/null} ;
echo --
run: ntpdate -q ${3:-ntp.vyatta.com}
diff --git a/templates/show/system/boot-messages/node.def b/templates/show/system/boot-messages/node.def
index 7180083..2781578 100644
--- a/templates/show/system/boot-messages/node.def
+++ b/templates/show/system/boot-messages/node.def
@@ -1,2 +1,2 @@
-help: "Show kernel boot messages"
+help: Show kernel boot messages
run: ${OFR_PAGER:-cat -s} /var/log/dmes? /dev/null
diff --git a/templates/show/system/connections/node.def b/templates/show/system/connections/node.def
index 2341c5f..43da826 100644
--- a/templates/show/system/connections/node.def
+++ b/templates/show/system/connections/node.def
@@ -1,2 +1,2 @@
-help: "Show active network connections on the system"
+help: Show active network connections on the system
run: netstat -an
diff --git a/templates/show/system/kernel-messages/node.def b/templates/show/system/kernel-messages/node.def
index 6d82b77..4457b69 100644
--- a/templates/show/system/kernel-messages/node.def
+++ b/templates/show/system/kernel-messages/node.def
@@ -1,2 +1,2 @@
-help: "Show messages in kernel ring buffer"
+help: Show messages in kernel ring buffer
run: dmesg | ${OFR_PAGER:-cat -s}
diff --git a/templates/show/system/memory/node.def b/templates/show/system/memory/node.def
index 66eb12a..f66ce62 100644
--- a/templates/show/system/memory/node.def
+++ b/templates/show/system/memory/node.def
@@ -1,2 +1,2 @@
-help: "Show system memory usage"
+help: Show system memory usage
run: free -ot
diff --git a/templates/show/system/node.def b/templates/show/system/node.def
index 73e140d..4e7ed7a 100644
--- a/templates/show/system/node.def
+++ b/templates/show/system/node.def
@@ -1 +1 @@
-help: "Show system information"
+help: Show system information
diff --git a/templates/show/system/processes/node.def b/templates/show/system/processes/node.def
index 507ee60..b971827 100644
--- a/templates/show/system/processes/node.def
+++ b/templates/show/system/processes/node.def
@@ -1,2 +1,2 @@
-help: "Show system processes"
+help: Show system processes
run: ps ax
diff --git a/templates/show/system/processes/summary/node.def b/templates/show/system/processes/summary/node.def
index 6cf3e55..0430cd0 100644
--- a/templates/show/system/processes/summary/node.def
+++ b/templates/show/system/processes/summary/node.def
@@ -1,2 +1,2 @@
-help: "Show summary of system processes"
+help: Show summary of system processes
run: uptime
diff --git a/templates/show/system/storage/node.def b/templates/show/system/storage/node.def
index 7178454..8a7bb6b 100644
--- a/templates/show/system/storage/node.def
+++ b/templates/show/system/storage/node.def
@@ -1,2 +1,2 @@
-help: "Show filesystem usage"
+help: Show filesystem usage
run: df -h -x squashfs
diff --git a/templates/show/version/node.def b/templates/show/version/node.def
index 8c583f8..272589e 100644
--- a/templates/show/version/node.def
+++ b/templates/show/version/node.def
@@ -1,2 +1,2 @@
-help: "Show Vyatta version information"
+help: Show Vyatta version information
run: ${vyatta_bindir}/vyatta-show-version
diff --git a/templates/terminal/length/node.def b/templates/terminal/length/node.def
index a6aaa85..47624e0 100644
--- a/templates/terminal/length/node.def
+++ b/templates/terminal/length/node.def
@@ -1,4 +1,4 @@
-help: "Set terminal page length [0 will disable paging]"
+help: Set terminal page length [0 will disable paging]
run: if [ -n "$3" ] ; then
if [ $3 -eq 0 ] ; then
OFR_PAGER='cat -s' ;
diff --git a/templates/terminal/no/length/node.def b/templates/terminal/no/length/node.def
index 27687f6..1df6f28 100644
--- a/templates/terminal/no/length/node.def
+++ b/templates/terminal/no/length/node.def
@@ -1,2 +1,2 @@
-help: "Disable terminal paging"
+help: Disable terminal paging
run: OFR_PAGER='cat -s'
diff --git a/templates/terminal/no/node.def b/templates/terminal/no/node.def
index 27687f6..1df6f28 100644
--- a/templates/terminal/no/node.def
+++ b/templates/terminal/no/node.def
@@ -1,2 +1,2 @@
-help: "Disable terminal paging"
+help: Disable terminal paging
run: OFR_PAGER='cat -s'
diff --git a/templates/terminal/node.def b/templates/terminal/node.def
index 548ca3c..e35e115 100644
--- a/templates/terminal/node.def
+++ b/templates/terminal/node.def
@@ -1,2 +1,2 @@
-help: "Set terminal page length"
+help: Set terminal page length
run: resize; OFR_PAGER=$OFR_DEFAULT_PAGER