summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/format/disk/node.def1
-rw-r--r--templates/format/disk/node.tag/like/node.def1
-rw-r--r--templates/format/disk/node.tag/like/node.tag/node.def61
-rw-r--r--templates/format/disk/node.tag/node.def6
-rw-r--r--templates/format/node.def1
-rw-r--r--templates/format/system-floppy/node.def2
-rw-r--r--templates/install/system/node.def2
-rw-r--r--templates/show/snmp/v3/certificates/node.def7
-rw-r--r--templates/show/snmp/v3/group/node.def2
-rw-r--r--templates/show/snmp/v3/node.def2
-rw-r--r--templates/show/snmp/v3/trap-target/node.def2
-rw-r--r--templates/show/snmp/v3/user/node.def2
-rw-r--r--templates/show/snmp/v3/view/node.def2
13 files changed, 17 insertions, 74 deletions
diff --git a/templates/format/disk/node.def b/templates/format/disk/node.def
deleted file mode 100644
index 97df9b7..0000000
--- a/templates/format/disk/node.def
+++ /dev/null
@@ -1 +0,0 @@
-help: Format a disk drive
diff --git a/templates/format/disk/node.tag/like/node.def b/templates/format/disk/node.tag/like/node.def
deleted file mode 100644
index c4a5126..0000000
--- a/templates/format/disk/node.tag/like/node.def
+++ /dev/null
@@ -1 +0,0 @@
-help: Format this disk the same as another disk
diff --git a/templates/format/disk/node.tag/like/node.tag/node.def b/templates/format/disk/node.tag/like/node.tag/node.def
deleted file mode 100644
index a98cbcc..0000000
--- a/templates/format/disk/node.tag/like/node.tag/node.def
+++ /dev/null
@@ -1,61 +0,0 @@
-help: Name of disk drive to partition it like
-
-allowed:
- local -a disks ;
- proto_disk=${COMP_WORDS[2]}
- disks=`cat /proc/partitions | awk '{ if ($4!="name") { print $4 } }' | egrep -v "[0-9]"`
- disks=`echo $disks | sed -e s/$proto_disk//g`
- echo -n $disks
-
-run:
- proto_disk=$5
- format_disk=$3
- backup_dir=/var/tmp
- eligible_format_disks=`cat /proc/partitions | awk '{ if ($4!="name") { print $4 } }' | egrep -v "[0-9]"`
- eligible_proto_disks=`echo $eligible_format_disks | sed -e s/$format_disk//g`
- proto_eligible=`echo $eligible_proto_disks | grep $proto_disk`
- format_eligible=`echo $eligible_format_disks | grep $format_disk`
- busy_check=`sudo /sbin/sfdisk -R /dev/$format_disk 2>&1`
-
- if [ $proto_disk = $format_disk ]; then
- echo "The two disk drives must be different."
- elif [ ! -b /dev/$proto_disk ]; then
- echo "Device /dev/$proto_disk does not exist"
- elif [ ! -b /dev/$format_disk ]; then
- echo "Device /dev/$format_disk does not exist"
- elif [ -z "$format_eligible" ]; then
- echo "Device $format_disk can not be formatted"
- elif [ -z "$proto_eligible" ]; then
- echo "Device $proto_disk can not be used as a prototype for $format_disk"
- elif [ -n "$busy_check" ]; then
- echo "Disk device $format_disk is busy. Can't format it now."
- elif [ ! -r /dev/$format_disk ]; then
- echo "Must be admin or root to format disk"
- else
- echo "This will re-format disk $format_disk so that it has the same disk"
- echo "partion sizes and offsets as $proto_disk. This will not copy"
- echo "data from $proto_disk to $format_disk. But this will erase all"
- echo "data on $format_disk."
- echo
- echo -n "Do you wish to proceed (yes, NO)? "
- read response
- if [ "$response" = "yes" ]; then
- echo "OK. Re-formating disk drive $format_disk..."
- echo "Making backup copy of partitions..."
- sudo /sbin/sfdisk -d /dev/$format_disk > $backup_dir/backup_$format_disk.`date +%F-%R`
- sleep 1
- partitions=`cat /proc/partitions | grep $format_disk'[0-9]' | awk '{ print $4 }' | sed 's/[a-z]//g'`
- if [ -n "$partitions" ]; then
- echo -n "Deleting old partitions..."
- for part in $partitions ; do
- sudo /sbin/parted /dev/$format_disk rm $part
- done
- echo ""
- fi
- echo "Creating new partitions on $format_disk based on $proto_disk..."
- sudo /sbin/sfdisk -d /dev/$proto_disk | sudo /sbin/sfdisk --force /dev/$format_disk
- echo "Done."
- else
- echo "OK. Disk drive $format_drive will not be re-formated."
- fi
- fi
diff --git a/templates/format/disk/node.tag/node.def b/templates/format/disk/node.tag/node.def
deleted file mode 100644
index 2b77c5b..0000000
--- a/templates/format/disk/node.tag/node.def
+++ /dev/null
@@ -1,6 +0,0 @@
-help: Disk drive 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/format/node.def b/templates/format/node.def
deleted file mode 100644
index 5775951..0000000
--- a/templates/format/node.def
+++ /dev/null
@@ -1 +0,0 @@
-help: Format a device
diff --git a/templates/format/system-floppy/node.def b/templates/format/system-floppy/node.def
deleted file mode 100644
index c897913..0000000
--- a/templates/format/system-floppy/node.def
+++ /dev/null
@@ -1,2 +0,0 @@
-help: Format and prepare a floppy to save the config.boot file
-run: sudo /opt/vyatta/sbin/init-floppy
diff --git a/templates/install/system/node.def b/templates/install/system/node.def
deleted file mode 100644
index c200404..0000000
--- a/templates/install/system/node.def
+++ /dev/null
@@ -1,2 +0,0 @@
-help: Install system to hard drive
-run: sudo /opt/vyatta/sbin/install-system
diff --git a/templates/show/snmp/v3/certificates/node.def b/templates/show/snmp/v3/certificates/node.def
new file mode 100644
index 0000000..e66fc0d
--- /dev/null
+++ b/templates/show/snmp/v3/certificates/node.def
@@ -0,0 +1,7 @@
+help: Show TSM certificates
+run: files=`sudo ls /etc/snmp/tls/certs/ 2> /dev/null`;
+ if [ -n "$files" ]; then
+ sudo /usr/bin/net-snmp-cert showcerts --subject --fingerprint
+ else
+ echo "You don't have any certificates. Put it in '/etc/snmp/tls/certs/' folder."
+ fi
diff --git a/templates/show/snmp/v3/group/node.def b/templates/show/snmp/v3/group/node.def
new file mode 100644
index 0000000..7ff947a
--- /dev/null
+++ b/templates/show/snmp/v3/group/node.def
@@ -0,0 +1,2 @@
+help: Show the list of configured groups
+run: /opt/vyatta/bin/vyatta-show-snmp-v3.pl --group \ No newline at end of file
diff --git a/templates/show/snmp/v3/node.def b/templates/show/snmp/v3/node.def
new file mode 100644
index 0000000..70c0df2
--- /dev/null
+++ b/templates/show/snmp/v3/node.def
@@ -0,0 +1,2 @@
+help: Show status of SNMP v3 on localhost
+run: /opt/vyatta/bin/vyatta-show-snmp-v3.pl --all \ No newline at end of file
diff --git a/templates/show/snmp/v3/trap-target/node.def b/templates/show/snmp/v3/trap-target/node.def
new file mode 100644
index 0000000..9f0d2f1
--- /dev/null
+++ b/templates/show/snmp/v3/trap-target/node.def
@@ -0,0 +1,2 @@
+help: Show the list of configured targets
+run: /opt/vyatta/bin/vyatta-show-snmp-v3.pl --trap
diff --git a/templates/show/snmp/v3/user/node.def b/templates/show/snmp/v3/user/node.def
new file mode 100644
index 0000000..621ccc8
--- /dev/null
+++ b/templates/show/snmp/v3/user/node.def
@@ -0,0 +1,2 @@
+help: Show the list of configured users
+run: /opt/vyatta/bin/vyatta-show-snmp-v3.pl --user
diff --git a/templates/show/snmp/v3/view/node.def b/templates/show/snmp/v3/view/node.def
new file mode 100644
index 0000000..7e05d84
--- /dev/null
+++ b/templates/show/snmp/v3/view/node.def
@@ -0,0 +1,2 @@
+help: Show the list of configured views
+run: /opt/vyatta/bin/vyatta-show-snmp-v3.pl --view \ No newline at end of file