UNCLASSIFIED

Skip to content
Snippets Groups Projects
Commit 7fccd747 authored by Luke ODonnell's avatar Luke ODonnell
Browse files

Update test.sh

parent 46bfa84f
Branches
No related merge requests found
......@@ -15,15 +15,23 @@ function setup_volume {
#get list of disks
disks=$(lsblk | grep disk | cut -d ' ' -f 1)
#select the first one with no partitions
for disk in $disks; do
if (lsblk | grep -v disk | grep "$disk" 2&>/dev/null); then
echo "skipping $disk"
continue
else
echo "found $disk"
volume="$disk"
break
let retry=0
while [ -z $disk ]; do
for disk in $disks; do
if (lsblk | grep -v disk | grep "$disk" 2&>/dev/null); then
echo "skipping $disk"
continue
else
echo "found $disk"
volume="$disk"
break
fi
done
if ("$retry" = 3); do
exit 1
fi
let retry++
sleep 20s
done
#create partition table, partition, and filesystem
echo "using /dev/$volume1"
......
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