UNCLASSIFIED

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

Update test.sh

parent 5c540eef
No related merge requests found
......@@ -15,23 +15,15 @@ function setup_volume {
#get list of disks
disks=$(lsblk | grep disk | cut -d ' ' -f 1)
#select the first one with no partitions
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); then
exit 1
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
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