summaryrefslogtreecommitdiff
path: root/templates/show
diff options
context:
space:
mode:
Diffstat (limited to 'templates/show')
-rw-r--r--templates/show/disk/node.def1
-rw-r--r--templates/show/disk/node.tag/format/node.def12
-rw-r--r--templates/show/disk/node.tag/node.def7
-rw-r--r--templates/show/dns/dynamic/node.def1
-rw-r--r--templates/show/dns/dynamic/status/node.def3
-rw-r--r--templates/show/dns/forwarding/nameservers/node.def2
-rw-r--r--templates/show/dns/forwarding/node.def1
-rw-r--r--templates/show/dns/forwarding/statistics/node.def8
-rw-r--r--templates/show/dns/node.def1
-rw-r--r--templates/show/raid/node.def2
-rw-r--r--templates/show/raid/node.tag/node.def16
11 files changed, 54 insertions, 0 deletions
diff --git a/templates/show/disk/node.def b/templates/show/disk/node.def
new file mode 100644
index 0000000..8572a9f
--- /dev/null
+++ b/templates/show/disk/node.def
@@ -0,0 +1 @@
+help: Show status of disk device
diff --git a/templates/show/disk/node.tag/format/node.def b/templates/show/disk/node.tag/format/node.def
new file mode 100644
index 0000000..e05b4ad
--- /dev/null
+++ b/templates/show/disk/node.tag/format/node.def
@@ -0,0 +1,12 @@
+help: Show disk drive formatting
+
+run:
+ disk_dev=$3
+ valid_disks=`cat /proc/partitions | awk '{ if ($4!="name") { print $4 } }' | egrep -v "[0-9]"`
+ is_a_disk=`echo $valid_disks | grep $disk_dev`
+
+ if [ -z "$is_a_disk" ]; then
+ echo "$disk_dev is not a disk device"
+ else
+ fdisk -l /dev/${disk_dev}
+ fi
diff --git a/templates/show/disk/node.tag/node.def b/templates/show/disk/node.tag/node.def
new file mode 100644
index 0000000..7e4fe05
--- /dev/null
+++ b/templates/show/disk/node.tag/node.def
@@ -0,0 +1,7 @@
+help: Disk device name
+
+allowed:
+ local -a array ;
+ array=`cat /proc/partitions | awk '{ if ($4!="name") { print $4 } }' | egrep -v "[0-9]"`
+ echo -n $array
+
diff --git a/templates/show/dns/dynamic/node.def b/templates/show/dns/dynamic/node.def
new file mode 100644
index 0000000..9a06b38
--- /dev/null
+++ b/templates/show/dns/dynamic/node.def
@@ -0,0 +1 @@
+help: Show Dynamic DNS information
diff --git a/templates/show/dns/dynamic/status/node.def b/templates/show/dns/dynamic/status/node.def
new file mode 100644
index 0000000..870c883
--- /dev/null
+++ b/templates/show/dns/dynamic/status/node.def
@@ -0,0 +1,3 @@
+help: Show Dynamic DNS status
+run:
+ sudo /opt/vyatta/bin/sudo-users/vyatta-op-dynamic-dns.pl --show-status
diff --git a/templates/show/dns/forwarding/nameservers/node.def b/templates/show/dns/forwarding/nameservers/node.def
new file mode 100644
index 0000000..0609f6a
--- /dev/null
+++ b/templates/show/dns/forwarding/nameservers/node.def
@@ -0,0 +1,2 @@
+help: Show DNS forwarding nameservers information
+run: sudo /opt/vyatta/bin/sudo-users/vyatta-op-dns-forwarding.pl --show-nameservers
diff --git a/templates/show/dns/forwarding/node.def b/templates/show/dns/forwarding/node.def
new file mode 100644
index 0000000..eb9ce4b
--- /dev/null
+++ b/templates/show/dns/forwarding/node.def
@@ -0,0 +1 @@
+help: Show DNS forwarding information
diff --git a/templates/show/dns/forwarding/statistics/node.def b/templates/show/dns/forwarding/statistics/node.def
new file mode 100644
index 0000000..a73b49d
--- /dev/null
+++ b/templates/show/dns/forwarding/statistics/node.def
@@ -0,0 +1,8 @@
+help: Show DNS forwarding statistics
+run:
+ if ps ax | grep dnsmasq | grep -v grep > /dev/null
+ then
+ sudo /opt/vyatta/bin/sudo-users/vyatta-op-dns-forwarding.pl --show-statistics
+ else
+ echo "DNS forwarding not configured"
+ fi
diff --git a/templates/show/dns/node.def b/templates/show/dns/node.def
new file mode 100644
index 0000000..45d0e4f
--- /dev/null
+++ b/templates/show/dns/node.def
@@ -0,0 +1 @@
+help: Show Domain Name Server (DNS) information
diff --git a/templates/show/raid/node.def b/templates/show/raid/node.def
new file mode 100644
index 0000000..d0ec96d
--- /dev/null
+++ b/templates/show/raid/node.def
@@ -0,0 +1,2 @@
+help: Show status of RAID set
+
diff --git a/templates/show/raid/node.tag/node.def b/templates/show/raid/node.tag/node.def
new file mode 100644
index 0000000..bc83a73
--- /dev/null
+++ b/templates/show/raid/node.tag/node.def
@@ -0,0 +1,16 @@
+help: RAID set name
+
+allowed:
+ local -a raid_sets ;
+ raid_sets=`cat /proc/partitions | grep md | awk '{ print $4 }'`
+ echo -n $raid_sets
+
+run:
+ raid_set_name=$3
+ raid_sets=`cat /proc/partitions | grep md | awk '{ print $4 }'`
+ valid_set=`echo $raid_sets | grep $raid_set_name`
+ if [ -z $valid_set ]; then
+ echo "$raid_set_name is not a RAID set"
+ else
+ mdadm --detail /dev/${raid_set_name}
+ fi \ No newline at end of file