diff options
author | Bob Gilligan <gilligan@vyatta.com> | 2008-09-10 15:54:16 -0700 |
---|---|---|
committer | Bob Gilligan <gilligan@vyatta.com> | 2008-09-10 15:54:16 -0700 |
commit | 15c75d023be453a717aefc82f02b6ef6fd8b7ace (patch) | |
tree | 3aafdd6511dd56d79de6599d5eed17a625f5a56a /templates/show/disk | |
parent | 39ef568ad5da594f92ea445bfd1190aa54ff0fb8 (diff) | |
download | vyatta-op-15c75d023be453a717aefc82f02b6ef6fd8b7ace.tar.gz vyatta-op-15c75d023be453a717aefc82f02b6ef6fd8b7ace.zip |
Add operational mode commands for RAID.
Diffstat (limited to 'templates/show/disk')
-rw-r--r-- | templates/show/disk/node.def | 1 | ||||
-rw-r--r-- | templates/show/disk/node.tag/format/node.def | 12 | ||||
-rw-r--r-- | templates/show/disk/node.tag/node.def | 7 |
3 files changed, 20 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 + |