fix hardcoded device

This commit is contained in:
Patrick Neumann 2019-01-30 13:28:52 +01:00
parent 756ad5f231
commit 74306b77c5

View File

@ -64,7 +64,7 @@ if blkid "${USBSTICK}"3 | grep -F persistence &> /dev/null ; then
fi fi
# add 3rd partition to the end of the usb stick # add 3rd partition to the end of the usb stick
FREE="$( parted -m /dev/sdd print free | grep -F free | tail -n 1 )" FREE="$( parted -m "${USBSTICK}" print free | grep -F free | tail -n 1 )"
START="$( printf "${FREE}" | awk -F ":" '{ print $2; }' )" START="$( printf "${FREE}" | awk -F ":" '{ print $2; }' )"
END="$( printf "${FREE}" | awk -F ":" '{ print $3; }' )" END="$( printf "${FREE}" | awk -F ":" '{ print $3; }' )"
parted "${USBSTICK}" mkpart primary "${START}" "${END}" parted "${USBSTICK}" mkpart primary "${START}" "${END}"