summaryrefslogtreecommitdiff
path: root/templates/show/disk
diff options
context:
space:
mode:
authorBob Gilligan <gilligan@vyatta.com>2008-10-29 16:32:30 -0700
committerBob Gilligan <gilligan@vyatta.com>2008-10-29 16:32:30 -0700
commit78e41fb517a63c4a9cc225975e4714f84918149d (patch)
tree5a490f5f62b8be03c18b230e50bb1f7c327d86a5 /templates/show/disk
parent5304fabe0b0eb212936ca1f47e4cf98d73fd6b81 (diff)
downloadvyatta-op-78e41fb517a63c4a9cc225975e4714f84918149d.tar.gz
vyatta-op-78e41fb517a63c4a9cc225975e4714f84918149d.zip
Bugfix: 3841: Allow admin level users to run the RAID op mode commands.
Diffstat (limited to 'templates/show/disk')
-rw-r--r--templates/show/disk/node.tag/format/node.def4
1 files changed, 3 insertions, 1 deletions
diff --git a/templates/show/disk/node.tag/format/node.def b/templates/show/disk/node.tag/format/node.def
index e05b4ad..e5829ca 100644
--- a/templates/show/disk/node.tag/format/node.def
+++ b/templates/show/disk/node.tag/format/node.def
@@ -7,6 +7,8 @@ run:
if [ -z "$is_a_disk" ]; then
echo "$disk_dev is not a disk device"
+ elif [ ! -r /dev/${disk_dev} ]; then
+ echo "Must be admin or root to display disk formating"
else
- fdisk -l /dev/${disk_dev}
+ /sbin/fdisk -l /dev/${disk_dev}
fi