Compare commits

..

No commits in common. "d7629049d66a5f61b089047969a67a4b082a0031" and "4beb8cfa4df1f7c64a5f629e956cb4a0077008ab" have entirely different histories.

1 changed files with 0 additions and 23 deletions

View File

@ -5,13 +5,11 @@ LOGFILE=/tmp/void-usb-install-log
function press_any_key {
echo "Press any key to continue or Ctrl+c to abort..."
read -n1 DISCARD_ME
echo ""
}
function are_you_really_really_sure {
echo "Enter the following to continue: $1"
read -p "> " DISCARD_ME
echo ""
if [ "$1" = "$DISCARD_ME" ]; then
return 0
else
@ -102,27 +100,6 @@ else
exit 1
fi
if grep "$TARGET_DISK" /proc/mounts >> $LOGFILE 2>&1; then
echo "The device seems to be mounted. Unmount?"
if yesno; then
echo -n "Attempting to unmount... "
readarray -t MOUNTPOINTS <<< "$(findmnt --raw --noheadings --output SOURCE,TARGET | grep "$TARGET_DISK" | sed 's/^[^ ]* //')"
for I in ${!MOUNTPOINTS[@]}; do
umount -R "${MOUNTPOINTS[$I]}" >> $LOGFILE 2>&1
done
if grep "$TARGET_DISK" /proc/mounts >> $LOGFILE 2>&1; then
echo "failed"
echo "It seems the device is still mounted. Installation cannot continue."
exit 1
else
echo "done"
fi
else
echo "Aborting."
exit 1
fi
fi
echo -n "Wiping and partitioning storage... "
# new GPT
# 2M BIOS GRUB