summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-03-11 17:21:08 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-03-11 17:53:56 -0700
commit1eb09874a18e7523cb4b4b09ed0985a9e859bc81 (patch)
treed2c00525f8bdd10c69af6739249dd219255647ee
parentafa4740db04c68dd31a999e05fd2ceca84b88c5d (diff)
downloadvyatta-op-1eb09874a18e7523cb4b4b09ed0985a9e859bc81.tar.gz
vyatta-op-1eb09874a18e7523cb4b4b09ed0985a9e859bc81.zip
Cleanup show disk format
Use awk more effectivedly in finding disk names Check for block device.
-rw-r--r--templates/show/disk/node.tag/format/node.def9
1 files changed, 5 insertions, 4 deletions
diff --git a/templates/show/disk/node.tag/format/node.def b/templates/show/disk/node.tag/format/node.def
index 4b09369..ef65197 100644
--- a/templates/show/disk/node.tag/format/node.def
+++ b/templates/show/disk/node.tag/format/node.def
@@ -1,6 +1,7 @@
help: Show disk drive formatting
-run: dev=/dev/$3
- if [ ! -b $dev ]
- then echo "$3 is not a disk device"; exit 1
+run: disk_dev="/dev/$3"
+ if [ ! -b "$disk_dev" ]
+ then echo "$3 is not a disk device"
+ exit 1
fi
- /sbin/fdisk -l /dev/${disk_dev}
+ /sbin/fdisk -l "$disk_dev"