Commit c29da417 authored by Ryan Jackson's avatar Ryan Jackson

Make diskzap work on Linux

parent 4826eece
......@@ -29,9 +29,15 @@ fi
# XXX We really should not be using a heuristic to figure this out.
# We should get the info from Emulab central.
#
if [ $# -eq 0 ]; then
set -- `dmesg | egrep '(ad|da|ar|amrd)[0-9]: [0-9]+MB' | \
sed -e 's/^\([a-z][^:]*\):.*/\1/'`
if [ `uname` = FreeBSD ]; then
set -- `dmesg | egrep '(ad|da|ar|amrd)[0-9]: [0-9]+MB' | \
sed -e 's/^\([a-z][^:]*\):.*/\1/'`
else
# Linux
set -- `/bin/ls -d /sys/block/sd* | sed 's#.*/##'`
fi
fi
status=0
for disk in $*; do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment