tweaks
This commit is contained in:
@@ -25,7 +25,7 @@ width=`tput cols`
|
||||
height=`tput lines`
|
||||
window=$((height - 5))
|
||||
|
||||
if [ -e "/sys/firmware/efi/efivars" ]; then efi="1"; echo -e "\nUEFI detected..." else efi="0"; echo -e "\nBIOS detected..."; fi
|
||||
if [ -d "/sys/firmware/efi" ]; then efi="1"; echo -e "\nUEFI detected..." else efi="0"; echo -e "\nBIOS detected..."; fi
|
||||
|
||||
# gather input at the start
|
||||
devices=""; for device in $(ls /dev/disk/by-id | grep -v part); do devices="$devices $device off"; done
|
||||
@@ -121,7 +121,7 @@ if [ "$efi" = "1" ]; then
|
||||
echo "Done."
|
||||
done
|
||||
|
||||
for disk in `echo "$disks"`; do
|
||||
for disk in `echo "$boots"`; do
|
||||
echo ""
|
||||
echo "Creating boot partitions for device $disk..."
|
||||
errors=`sgdisk -n3:0:+512M -t3:BF01 /dev/disk/by-id/$disk 2>&1 1>/dev/null`
|
||||
@@ -158,15 +158,16 @@ for disk in `echo "$disks"`; do
|
||||
echo "Done."
|
||||
done
|
||||
|
||||
# create boot mirror list
|
||||
bootmirror=""; rootraidz=""; for disk in `echo "$disks"`; do bootmirror="$bootmirror /dev/disk/by-id/${disk}-part3"; rootraidz="$rootraidz /dev/disk/by-id/${disk}-part4"; done
|
||||
# create boot mirror list and root list
|
||||
bootmirror=""; for disk in `echo "$boots"`; do bootmirror="$bootmirror /dev/disk/by-id/${disk}-part3"; done
|
||||
rootraidz=""; for disk in `echo "$boots"`; do rootraidz="$rootraidz /dev/disk/by-id/${disk}-part4"; done
|
||||
|
||||
# refresh drives or there are missing partitions
|
||||
partprobe 2>/dev/null 1>/dev/null
|
||||
|
||||
# wait for the partitions to show up
|
||||
|
||||
for disk in `echo "$disk"`; do
|
||||
for disk in `echo "$boots"`; do
|
||||
pending="0"
|
||||
while ! [ -e "/dev/disk/by-id/${disk}-part3" ]; do
|
||||
partprobe 2>/dev/null 1>/dev/null
|
||||
|
||||
Reference in New Issue
Block a user