From eb51e368fa9cc2d1a016b888512aa05b02392667 Mon Sep 17 00:00:00 2001 From: Tom Grennan Date: Mon, 17 Sep 2007 14:01:46 -0700 Subject: rename op-templates --- Makefile.am | 2 +- op-templates/configure/node.def | 2 -- op-templates/date/node.def | 1 - op-templates/date/ntp/node.def | 1 - op-templates/date/ntp/op.tag/node.def | 3 --- op-templates/date/op.tag/node.def | 2 -- op-templates/show/interfaces/ethernet/node.def | 2 -- op-templates/show/interfaces/ethernet/node.tag/node.def | 5 ----- .../show/interfaces/ethernet/node.tag/physical/node.def | 3 --- op-templates/show/interfaces/ethernet/node.tag/vif/node.def | 4 ---- .../show/interfaces/ethernet/node.tag/vif/node.tag/node.def | 5 ----- .../ethernet/node.tag/vif/node.tag/physical/node.def | 2 -- op-templates/show/interfaces/loopback/node.def | 3 --- op-templates/show/interfaces/loopback/node.tag/node.def | 5 ----- op-templates/show/interfaces/node.def | 2 -- op-templates/show/interfaces/system/enabled/node.def | 2 -- op-templates/show/interfaces/system/node.def | 2 -- op-templates/show/interfaces/tunnel/node.def | 3 --- op-templates/show/interfaces/tunnel/node.tag/node.def | 5 ----- op-templates/show/node.def | 1 - op-templates/show/system/boot-messages/node.def | 2 -- op-templates/show/system/connections/node.def | 2 -- op-templates/show/system/kernel-messages/node.def | 2 -- op-templates/show/system/memory/node.def | 2 -- op-templates/show/system/node.def | 1 - op-templates/show/system/processes/node.def | 2 -- op-templates/show/system/processes/summary/node.def | 2 -- op-templates/show/system/storage/node.def | 2 -- op-templates/show/version/node.def | 2 -- op-templates/terminal/length/node.def | 12 ------------ op-templates/terminal/no/length/node.def | 2 -- op-templates/terminal/no/node.def | 2 -- op-templates/terminal/node.def | 2 -- templates/configure/node.def | 2 ++ templates/date/node.def | 1 + templates/date/ntp/node.def | 1 + templates/date/ntp/op.tag/node.def | 3 +++ templates/date/op.tag/node.def | 2 ++ templates/show/interfaces/ethernet/node.def | 2 ++ templates/show/interfaces/ethernet/node.tag/node.def | 5 +++++ .../show/interfaces/ethernet/node.tag/physical/node.def | 3 +++ templates/show/interfaces/ethernet/node.tag/vif/node.def | 4 ++++ .../show/interfaces/ethernet/node.tag/vif/node.tag/node.def | 5 +++++ .../ethernet/node.tag/vif/node.tag/physical/node.def | 2 ++ templates/show/interfaces/loopback/node.def | 3 +++ templates/show/interfaces/loopback/node.tag/node.def | 5 +++++ templates/show/interfaces/node.def | 2 ++ templates/show/interfaces/system/enabled/node.def | 2 ++ templates/show/interfaces/system/node.def | 2 ++ templates/show/interfaces/tunnel/node.def | 3 +++ templates/show/interfaces/tunnel/node.tag/node.def | 5 +++++ templates/show/node.def | 1 + templates/show/system/boot-messages/node.def | 2 ++ templates/show/system/connections/node.def | 2 ++ templates/show/system/kernel-messages/node.def | 2 ++ templates/show/system/memory/node.def | 2 ++ templates/show/system/node.def | 1 + templates/show/system/processes/node.def | 2 ++ templates/show/system/processes/summary/node.def | 2 ++ templates/show/system/storage/node.def | 2 ++ templates/show/version/node.def | 2 ++ templates/terminal/length/node.def | 12 ++++++++++++ templates/terminal/no/length/node.def | 2 ++ templates/terminal/no/node.def | 2 ++ templates/terminal/node.def | 2 ++ 65 files changed, 89 insertions(+), 89 deletions(-) delete mode 100644 op-templates/configure/node.def delete mode 100644 op-templates/date/node.def delete mode 100644 op-templates/date/ntp/node.def delete mode 100644 op-templates/date/ntp/op.tag/node.def delete mode 100644 op-templates/date/op.tag/node.def delete mode 100644 op-templates/show/interfaces/ethernet/node.def delete mode 100644 op-templates/show/interfaces/ethernet/node.tag/node.def delete mode 100644 op-templates/show/interfaces/ethernet/node.tag/physical/node.def delete mode 100644 op-templates/show/interfaces/ethernet/node.tag/vif/node.def delete mode 100644 op-templates/show/interfaces/ethernet/node.tag/vif/node.tag/node.def delete mode 100644 op-templates/show/interfaces/ethernet/node.tag/vif/node.tag/physical/node.def delete mode 100644 op-templates/show/interfaces/loopback/node.def delete mode 100644 op-templates/show/interfaces/loopback/node.tag/node.def delete mode 100644 op-templates/show/interfaces/node.def delete mode 100644 op-templates/show/interfaces/system/enabled/node.def delete mode 100644 op-templates/show/interfaces/system/node.def delete mode 100644 op-templates/show/interfaces/tunnel/node.def delete mode 100644 op-templates/show/interfaces/tunnel/node.tag/node.def delete mode 100644 op-templates/show/node.def delete mode 100644 op-templates/show/system/boot-messages/node.def delete mode 100644 op-templates/show/system/connections/node.def delete mode 100644 op-templates/show/system/kernel-messages/node.def delete mode 100644 op-templates/show/system/memory/node.def delete mode 100644 op-templates/show/system/node.def delete mode 100644 op-templates/show/system/processes/node.def delete mode 100644 op-templates/show/system/processes/summary/node.def delete mode 100644 op-templates/show/system/storage/node.def delete mode 100644 op-templates/show/version/node.def delete mode 100644 op-templates/terminal/length/node.def delete mode 100644 op-templates/terminal/no/length/node.def delete mode 100644 op-templates/terminal/no/node.def delete mode 100644 op-templates/terminal/node.def create mode 100644 templates/configure/node.def create mode 100644 templates/date/node.def create mode 100644 templates/date/ntp/node.def create mode 100644 templates/date/ntp/op.tag/node.def create mode 100644 templates/date/op.tag/node.def create mode 100644 templates/show/interfaces/ethernet/node.def create mode 100644 templates/show/interfaces/ethernet/node.tag/node.def create mode 100644 templates/show/interfaces/ethernet/node.tag/physical/node.def create mode 100644 templates/show/interfaces/ethernet/node.tag/vif/node.def create mode 100644 templates/show/interfaces/ethernet/node.tag/vif/node.tag/node.def create mode 100644 templates/show/interfaces/ethernet/node.tag/vif/node.tag/physical/node.def create mode 100644 templates/show/interfaces/loopback/node.def create mode 100644 templates/show/interfaces/loopback/node.tag/node.def create mode 100644 templates/show/interfaces/node.def create mode 100644 templates/show/interfaces/system/enabled/node.def create mode 100644 templates/show/interfaces/system/node.def create mode 100644 templates/show/interfaces/tunnel/node.def create mode 100644 templates/show/interfaces/tunnel/node.tag/node.def create mode 100644 templates/show/node.def create mode 100644 templates/show/system/boot-messages/node.def create mode 100644 templates/show/system/connections/node.def create mode 100644 templates/show/system/kernel-messages/node.def create mode 100644 templates/show/system/memory/node.def create mode 100644 templates/show/system/node.def create mode 100644 templates/show/system/processes/node.def create mode 100644 templates/show/system/processes/summary/node.def create mode 100644 templates/show/system/storage/node.def create mode 100644 templates/show/version/node.def create mode 100644 templates/terminal/length/node.def create mode 100644 templates/terminal/no/length/node.def create mode 100644 templates/terminal/no/node.def create mode 100644 templates/terminal/node.def diff --git a/Makefile.am b/Makefile.am index 27e36d6..83419df 100644 --- a/Makefile.am +++ b/Makefile.am @@ -9,4 +9,4 @@ cpiop = find . ! -regex '\(.*~\|.*\.bak\|.*\.swp\|.*\#.*\#\)' -print0 | \ install-exec-hook: mkdir -p $(DESTDIR)$(opdir) - cd op-templates; $(cpiop) $(DESTDIR)$(opdir) + cd templates; $(cpiop) $(DESTDIR)$(opdir) diff --git a/op-templates/configure/node.def b/op-templates/configure/node.def deleted file mode 100644 index 09d0e4b..0000000 --- a/op-templates/configure/node.def +++ /dev/null @@ -1,2 +0,0 @@ -help: "Enter configure mode" -run: export _OFR_CONFIGURE=ok; newgrp quaggavty ; unset _OFR_CONFIGURE diff --git a/op-templates/date/node.def b/op-templates/date/node.def deleted file mode 100644 index 0b1187b..0000000 --- a/op-templates/date/node.def +++ /dev/null @@ -1 +0,0 @@ -help: "Set system date and time" diff --git a/op-templates/date/ntp/node.def b/op-templates/date/ntp/node.def deleted file mode 100644 index 9b5fb8b..0000000 --- a/op-templates/date/ntp/node.def +++ /dev/null @@ -1 +0,0 @@ -help: "Set system date and time using NTP" diff --git a/op-templates/date/ntp/op.tag/node.def b/op-templates/date/ntp/op.tag/node.def deleted file mode 100644 index b958310..0000000 --- a/op-templates/date/ntp/op.tag/node.def +++ /dev/null @@ -1,3 +0,0 @@ -type: txt -help: "IP or hostname of NTP server" -run: "sudo ntpdate $3" diff --git a/op-templates/date/op.tag/node.def b/op-templates/date/op.tag/node.def deleted file mode 100644 index 01fb6b0..0000000 --- a/op-templates/date/op.tag/node.def +++ /dev/null @@ -1,2 +0,0 @@ -help: "Date and time [MMDDhhmm[.ss]YYYY]" -run: sudo date $2 diff --git a/op-templates/show/interfaces/ethernet/node.def b/op-templates/show/interfaces/ethernet/node.def deleted file mode 100644 index 9d70e68..0000000 --- a/op-templates/show/interfaces/ethernet/node.def +++ /dev/null @@ -1,2 +0,0 @@ -help: "Show ethernet interface information" -run: ${ofr_bindir}/show_interfaces_ethernet diff --git a/op-templates/show/interfaces/ethernet/node.tag/node.def b/op-templates/show/interfaces/ethernet/node.tag/node.def deleted file mode 100644 index df23e1d..0000000 --- a/op-templates/show/interfaces/ethernet/node.tag/node.def +++ /dev/null @@ -1,5 +0,0 @@ -help: "Show given ethernet interface information" -allowed: local -a array ; - array=( /sys/class/net/{eth,vmnet}* ) ; - echo -n ${array[@]##*/} -run: ${ofr_bindir}/show_interfaces_ethernet $4 diff --git a/op-templates/show/interfaces/ethernet/node.tag/physical/node.def b/op-templates/show/interfaces/ethernet/node.tag/physical/node.def deleted file mode 100644 index 9e907d1..0000000 --- a/op-templates/show/interfaces/ethernet/node.tag/physical/node.def +++ /dev/null @@ -1,3 +0,0 @@ -help: "Show physical device information of given ethernet interface" -allowed: "" -run: sudo ethtool $4 diff --git a/op-templates/show/interfaces/ethernet/node.tag/vif/node.def b/op-templates/show/interfaces/ethernet/node.tag/vif/node.def deleted file mode 100644 index 66490a7..0000000 --- a/op-templates/show/interfaces/ethernet/node.tag/vif/node.def +++ /dev/null @@ -1,4 +0,0 @@ -help: "Show given virtual network interface information" -run: tput setaf ${COLOR_RED:-1} ; - echo error: need to supply vif # ; - tput op diff --git a/op-templates/show/interfaces/ethernet/node.tag/vif/node.tag/node.def b/op-templates/show/interfaces/ethernet/node.tag/vif/node.tag/node.def deleted file mode 100644 index 6e114d8..0000000 --- a/op-templates/show/interfaces/ethernet/node.tag/vif/node.tag/node.def +++ /dev/null @@ -1,5 +0,0 @@ -help: "Show given virtual network interface information" -allowed: for eth in /sys/class/net/eth${4}.* ; do - echo ${eth/*eth${4}./} ; - done -run: ${ofr_bindir}/show_interfaces_ethernet $4 vif $6 diff --git a/op-templates/show/interfaces/ethernet/node.tag/vif/node.tag/physical/node.def b/op-templates/show/interfaces/ethernet/node.tag/vif/node.tag/physical/node.def deleted file mode 100644 index 56f986f..0000000 --- a/op-templates/show/interfaces/ethernet/node.tag/vif/node.tag/physical/node.def +++ /dev/null @@ -1,2 +0,0 @@ -help: "Show given virtual network interface pseudo-physical information" -run: ${ofr_bindir}/show_interfaces_ethernet $4 vif $6 physical diff --git a/op-templates/show/interfaces/loopback/node.def b/op-templates/show/interfaces/loopback/node.def deleted file mode 100644 index 45fa122..0000000 --- a/op-templates/show/interfaces/loopback/node.def +++ /dev/null @@ -1,3 +0,0 @@ -help: "Show loopback interface information" -run: ${ofr_bindir}/show_interfaces_loopback - diff --git a/op-templates/show/interfaces/loopback/node.tag/node.def b/op-templates/show/interfaces/loopback/node.tag/node.def deleted file mode 100644 index a9d46b8..0000000 --- a/op-templates/show/interfaces/loopback/node.tag/node.def +++ /dev/null @@ -1,5 +0,0 @@ -help: "Show given loopback interface information" -allowed: local -a array ; - array=( /sys/class/net/lo* ) ; - echo -n ${array[@]##*/} -run: ${ofr_bindir}/show_interfaces_loopback $4 diff --git a/op-templates/show/interfaces/node.def b/op-templates/show/interfaces/node.def deleted file mode 100644 index e5ca525..0000000 --- a/op-templates/show/interfaces/node.def +++ /dev/null @@ -1,2 +0,0 @@ -help: "Show network interface information" -run: ${ofr_bindir}/show_interfaces diff --git a/op-templates/show/interfaces/system/enabled/node.def b/op-templates/show/interfaces/system/enabled/node.def deleted file mode 100644 index b0ca038..0000000 --- a/op-templates/show/interfaces/system/enabled/node.def +++ /dev/null @@ -1,2 +0,0 @@ -help: "Show network information of all enabled interfaces" -run: ${ofr_bindir}/show_interfaces_system enabled diff --git a/op-templates/show/interfaces/system/node.def b/op-templates/show/interfaces/system/node.def deleted file mode 100644 index e62ba92..0000000 --- a/op-templates/show/interfaces/system/node.def +++ /dev/null @@ -1,2 +0,0 @@ -help: "Show network information of all interfaces" -run: ${ofr_bindir}/show_interfaces_system diff --git a/op-templates/show/interfaces/tunnel/node.def b/op-templates/show/interfaces/tunnel/node.def deleted file mode 100644 index 7bebfc2..0000000 --- a/op-templates/show/interfaces/tunnel/node.def +++ /dev/null @@ -1,3 +0,0 @@ -help: "Show tunnel interface information" -run: ${ofr_bindir}/show_interfaces_tunnel - diff --git a/op-templates/show/interfaces/tunnel/node.tag/node.def b/op-templates/show/interfaces/tunnel/node.tag/node.def deleted file mode 100644 index b3748e2..0000000 --- a/op-templates/show/interfaces/tunnel/node.tag/node.def +++ /dev/null @@ -1,5 +0,0 @@ -help: "Show given tunnel interface information" -allowed: local -a array ; - array=( /sys/class/net/sit* ) ; - echo -n ${array[@]##*/} -run: ${ofr_bindir}/show_interfaces_tunnel $4 diff --git a/op-templates/show/node.def b/op-templates/show/node.def deleted file mode 100644 index 73e140d..0000000 --- a/op-templates/show/node.def +++ /dev/null @@ -1 +0,0 @@ -help: "Show system information" diff --git a/op-templates/show/system/boot-messages/node.def b/op-templates/show/system/boot-messages/node.def deleted file mode 100644 index 7180083..0000000 --- a/op-templates/show/system/boot-messages/node.def +++ /dev/null @@ -1,2 +0,0 @@ -help: "Show kernel boot messages" -run: ${OFR_PAGER:-cat -s} /var/log/dmes? /dev/null diff --git a/op-templates/show/system/connections/node.def b/op-templates/show/system/connections/node.def deleted file mode 100644 index 2341c5f..0000000 --- a/op-templates/show/system/connections/node.def +++ /dev/null @@ -1,2 +0,0 @@ -help: "Show active network connections on the system" -run: netstat -an diff --git a/op-templates/show/system/kernel-messages/node.def b/op-templates/show/system/kernel-messages/node.def deleted file mode 100644 index 6d82b77..0000000 --- a/op-templates/show/system/kernel-messages/node.def +++ /dev/null @@ -1,2 +0,0 @@ -help: "Show messages in kernel ring buffer" -run: dmesg | ${OFR_PAGER:-cat -s} diff --git a/op-templates/show/system/memory/node.def b/op-templates/show/system/memory/node.def deleted file mode 100644 index af15820..0000000 --- a/op-templates/show/system/memory/node.def +++ /dev/null @@ -1,2 +0,0 @@ -help: "Show system memory usage" -run: "free -ot" diff --git a/op-templates/show/system/node.def b/op-templates/show/system/node.def deleted file mode 100644 index 73e140d..0000000 --- a/op-templates/show/system/node.def +++ /dev/null @@ -1 +0,0 @@ -help: "Show system information" diff --git a/op-templates/show/system/processes/node.def b/op-templates/show/system/processes/node.def deleted file mode 100644 index 507ee60..0000000 --- a/op-templates/show/system/processes/node.def +++ /dev/null @@ -1,2 +0,0 @@ -help: "Show system processes" -run: ps ax diff --git a/op-templates/show/system/processes/summary/node.def b/op-templates/show/system/processes/summary/node.def deleted file mode 100644 index 6cf3e55..0000000 --- a/op-templates/show/system/processes/summary/node.def +++ /dev/null @@ -1,2 +0,0 @@ -help: "Show summary of system processes" -run: uptime diff --git a/op-templates/show/system/storage/node.def b/op-templates/show/system/storage/node.def deleted file mode 100644 index 7178454..0000000 --- a/op-templates/show/system/storage/node.def +++ /dev/null @@ -1,2 +0,0 @@ -help: "Show filesystem usage" -run: df -h -x squashfs diff --git a/op-templates/show/version/node.def b/op-templates/show/version/node.def deleted file mode 100644 index da526d2..0000000 --- a/op-templates/show/version/node.def +++ /dev/null @@ -1,2 +0,0 @@ -help: "Show OFR version information" -run: cat $ofr_docdir/*/build.txt /dev/null diff --git a/op-templates/terminal/length/node.def b/op-templates/terminal/length/node.def deleted file mode 100644 index a6aaa85..0000000 --- a/op-templates/terminal/length/node.def +++ /dev/null @@ -1,12 +0,0 @@ -help: "Set terminal page length [0 will disable paging]" -run: if [ -n "$3" ] ; then - if [ $3 -eq 0 ] ; then - OFR_PAGER='cat -s' ; - else - export LINES=$3 ; - stty rows $3 ; - fi ; - else - eval $( resize ) ; - fi ; - : ${OFR_PAGER:=${OFR_DEFAULT_PAGER}} diff --git a/op-templates/terminal/no/length/node.def b/op-templates/terminal/no/length/node.def deleted file mode 100644 index 27687f6..0000000 --- a/op-templates/terminal/no/length/node.def +++ /dev/null @@ -1,2 +0,0 @@ -help: "Disable terminal paging" -run: OFR_PAGER='cat -s' diff --git a/op-templates/terminal/no/node.def b/op-templates/terminal/no/node.def deleted file mode 100644 index 27687f6..0000000 --- a/op-templates/terminal/no/node.def +++ /dev/null @@ -1,2 +0,0 @@ -help: "Disable terminal paging" -run: OFR_PAGER='cat -s' diff --git a/op-templates/terminal/node.def b/op-templates/terminal/node.def deleted file mode 100644 index 548ca3c..0000000 --- a/op-templates/terminal/node.def +++ /dev/null @@ -1,2 +0,0 @@ -help: "Set terminal page length" -run: resize; OFR_PAGER=$OFR_DEFAULT_PAGER diff --git a/templates/configure/node.def b/templates/configure/node.def new file mode 100644 index 0000000..09d0e4b --- /dev/null +++ b/templates/configure/node.def @@ -0,0 +1,2 @@ +help: "Enter configure mode" +run: export _OFR_CONFIGURE=ok; newgrp quaggavty ; unset _OFR_CONFIGURE diff --git a/templates/date/node.def b/templates/date/node.def new file mode 100644 index 0000000..0b1187b --- /dev/null +++ b/templates/date/node.def @@ -0,0 +1 @@ +help: "Set system date and time" diff --git a/templates/date/ntp/node.def b/templates/date/ntp/node.def new file mode 100644 index 0000000..9b5fb8b --- /dev/null +++ b/templates/date/ntp/node.def @@ -0,0 +1 @@ +help: "Set system date and time using NTP" diff --git a/templates/date/ntp/op.tag/node.def b/templates/date/ntp/op.tag/node.def new file mode 100644 index 0000000..b958310 --- /dev/null +++ b/templates/date/ntp/op.tag/node.def @@ -0,0 +1,3 @@ +type: txt +help: "IP or hostname of NTP server" +run: "sudo ntpdate $3" diff --git a/templates/date/op.tag/node.def b/templates/date/op.tag/node.def new file mode 100644 index 0000000..01fb6b0 --- /dev/null +++ b/templates/date/op.tag/node.def @@ -0,0 +1,2 @@ +help: "Date and time [MMDDhhmm[.ss]YYYY]" +run: sudo date $2 diff --git a/templates/show/interfaces/ethernet/node.def b/templates/show/interfaces/ethernet/node.def new file mode 100644 index 0000000..9d70e68 --- /dev/null +++ b/templates/show/interfaces/ethernet/node.def @@ -0,0 +1,2 @@ +help: "Show ethernet interface information" +run: ${ofr_bindir}/show_interfaces_ethernet diff --git a/templates/show/interfaces/ethernet/node.tag/node.def b/templates/show/interfaces/ethernet/node.tag/node.def new file mode 100644 index 0000000..df23e1d --- /dev/null +++ b/templates/show/interfaces/ethernet/node.tag/node.def @@ -0,0 +1,5 @@ +help: "Show given ethernet interface information" +allowed: local -a array ; + array=( /sys/class/net/{eth,vmnet}* ) ; + echo -n ${array[@]##*/} +run: ${ofr_bindir}/show_interfaces_ethernet $4 diff --git a/templates/show/interfaces/ethernet/node.tag/physical/node.def b/templates/show/interfaces/ethernet/node.tag/physical/node.def new file mode 100644 index 0000000..9e907d1 --- /dev/null +++ b/templates/show/interfaces/ethernet/node.tag/physical/node.def @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000..66490a7 --- /dev/null +++ b/templates/show/interfaces/ethernet/node.tag/vif/node.def @@ -0,0 +1,4 @@ +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 new file mode 100644 index 0000000..6e114d8 --- /dev/null +++ b/templates/show/interfaces/ethernet/node.tag/vif/node.tag/node.def @@ -0,0 +1,5 @@ +help: "Show given virtual network interface information" +allowed: for eth in /sys/class/net/eth${4}.* ; do + echo ${eth/*eth${4}./} ; + done +run: ${ofr_bindir}/show_interfaces_ethernet $4 vif $6 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 new file mode 100644 index 0000000..56f986f --- /dev/null +++ b/templates/show/interfaces/ethernet/node.tag/vif/node.tag/physical/node.def @@ -0,0 +1,2 @@ +help: "Show given virtual network interface pseudo-physical information" +run: ${ofr_bindir}/show_interfaces_ethernet $4 vif $6 physical diff --git a/templates/show/interfaces/loopback/node.def b/templates/show/interfaces/loopback/node.def new file mode 100644 index 0000000..45fa122 --- /dev/null +++ b/templates/show/interfaces/loopback/node.def @@ -0,0 +1,3 @@ +help: "Show loopback interface information" +run: ${ofr_bindir}/show_interfaces_loopback + diff --git a/templates/show/interfaces/loopback/node.tag/node.def b/templates/show/interfaces/loopback/node.tag/node.def new file mode 100644 index 0000000..a9d46b8 --- /dev/null +++ b/templates/show/interfaces/loopback/node.tag/node.def @@ -0,0 +1,5 @@ +help: "Show given loopback interface information" +allowed: local -a array ; + array=( /sys/class/net/lo* ) ; + echo -n ${array[@]##*/} +run: ${ofr_bindir}/show_interfaces_loopback $4 diff --git a/templates/show/interfaces/node.def b/templates/show/interfaces/node.def new file mode 100644 index 0000000..e5ca525 --- /dev/null +++ b/templates/show/interfaces/node.def @@ -0,0 +1,2 @@ +help: "Show network interface information" +run: ${ofr_bindir}/show_interfaces diff --git a/templates/show/interfaces/system/enabled/node.def b/templates/show/interfaces/system/enabled/node.def new file mode 100644 index 0000000..b0ca038 --- /dev/null +++ b/templates/show/interfaces/system/enabled/node.def @@ -0,0 +1,2 @@ +help: "Show network information of all enabled interfaces" +run: ${ofr_bindir}/show_interfaces_system enabled diff --git a/templates/show/interfaces/system/node.def b/templates/show/interfaces/system/node.def new file mode 100644 index 0000000..e62ba92 --- /dev/null +++ b/templates/show/interfaces/system/node.def @@ -0,0 +1,2 @@ +help: "Show network information of all interfaces" +run: ${ofr_bindir}/show_interfaces_system diff --git a/templates/show/interfaces/tunnel/node.def b/templates/show/interfaces/tunnel/node.def new file mode 100644 index 0000000..7bebfc2 --- /dev/null +++ b/templates/show/interfaces/tunnel/node.def @@ -0,0 +1,3 @@ +help: "Show tunnel interface information" +run: ${ofr_bindir}/show_interfaces_tunnel + diff --git a/templates/show/interfaces/tunnel/node.tag/node.def b/templates/show/interfaces/tunnel/node.tag/node.def new file mode 100644 index 0000000..b3748e2 --- /dev/null +++ b/templates/show/interfaces/tunnel/node.tag/node.def @@ -0,0 +1,5 @@ +help: "Show given tunnel interface information" +allowed: local -a array ; + array=( /sys/class/net/sit* ) ; + echo -n ${array[@]##*/} +run: ${ofr_bindir}/show_interfaces_tunnel $4 diff --git a/templates/show/node.def b/templates/show/node.def new file mode 100644 index 0000000..73e140d --- /dev/null +++ b/templates/show/node.def @@ -0,0 +1 @@ +help: "Show system information" diff --git a/templates/show/system/boot-messages/node.def b/templates/show/system/boot-messages/node.def new file mode 100644 index 0000000..7180083 --- /dev/null +++ b/templates/show/system/boot-messages/node.def @@ -0,0 +1,2 @@ +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 new file mode 100644 index 0000000..2341c5f --- /dev/null +++ b/templates/show/system/connections/node.def @@ -0,0 +1,2 @@ +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 new file mode 100644 index 0000000..6d82b77 --- /dev/null +++ b/templates/show/system/kernel-messages/node.def @@ -0,0 +1,2 @@ +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 new file mode 100644 index 0000000..af15820 --- /dev/null +++ b/templates/show/system/memory/node.def @@ -0,0 +1,2 @@ +help: "Show system memory usage" +run: "free -ot" diff --git a/templates/show/system/node.def b/templates/show/system/node.def new file mode 100644 index 0000000..73e140d --- /dev/null +++ b/templates/show/system/node.def @@ -0,0 +1 @@ +help: "Show system information" diff --git a/templates/show/system/processes/node.def b/templates/show/system/processes/node.def new file mode 100644 index 0000000..507ee60 --- /dev/null +++ b/templates/show/system/processes/node.def @@ -0,0 +1,2 @@ +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 new file mode 100644 index 0000000..6cf3e55 --- /dev/null +++ b/templates/show/system/processes/summary/node.def @@ -0,0 +1,2 @@ +help: "Show summary of system processes" +run: uptime diff --git a/templates/show/system/storage/node.def b/templates/show/system/storage/node.def new file mode 100644 index 0000000..7178454 --- /dev/null +++ b/templates/show/system/storage/node.def @@ -0,0 +1,2 @@ +help: "Show filesystem usage" +run: df -h -x squashfs diff --git a/templates/show/version/node.def b/templates/show/version/node.def new file mode 100644 index 0000000..da526d2 --- /dev/null +++ b/templates/show/version/node.def @@ -0,0 +1,2 @@ +help: "Show OFR version information" +run: cat $ofr_docdir/*/build.txt /dev/null diff --git a/templates/terminal/length/node.def b/templates/terminal/length/node.def new file mode 100644 index 0000000..a6aaa85 --- /dev/null +++ b/templates/terminal/length/node.def @@ -0,0 +1,12 @@ +help: "Set terminal page length [0 will disable paging]" +run: if [ -n "$3" ] ; then + if [ $3 -eq 0 ] ; then + OFR_PAGER='cat -s' ; + else + export LINES=$3 ; + stty rows $3 ; + fi ; + else + eval $( resize ) ; + fi ; + : ${OFR_PAGER:=${OFR_DEFAULT_PAGER}} diff --git a/templates/terminal/no/length/node.def b/templates/terminal/no/length/node.def new file mode 100644 index 0000000..27687f6 --- /dev/null +++ b/templates/terminal/no/length/node.def @@ -0,0 +1,2 @@ +help: "Disable terminal paging" +run: OFR_PAGER='cat -s' diff --git a/templates/terminal/no/node.def b/templates/terminal/no/node.def new file mode 100644 index 0000000..27687f6 --- /dev/null +++ b/templates/terminal/no/node.def @@ -0,0 +1,2 @@ +help: "Disable terminal paging" +run: OFR_PAGER='cat -s' diff --git a/templates/terminal/node.def b/templates/terminal/node.def new file mode 100644 index 0000000..548ca3c --- /dev/null +++ b/templates/terminal/node.def @@ -0,0 +1,2 @@ +help: "Set terminal page length" +run: resize; OFR_PAGER=$OFR_DEFAULT_PAGER -- cgit v1.2.3