test
sean 7 years ago
parent f6d197b89e
commit c228adfa5c

@ -28,6 +28,11 @@ window=$((height - 5))
# gather input at the start # gather input at the start
devices=""; for device in $(ls /dev/disk/by-id | grep -v part); do devices="$devices $device off"; done devices=""; for device in $(ls /dev/disk/by-id | grep -v part); do devices="$devices $device off"; done
disks=`dialog --separate-output --no-cancel --no-items --title "Root devices" --checklist "Select root OS disks:" $height $width ${window}$devices 2>&1 1>/dev/tty` disks=`dialog --separate-output --no-cancel --no-items --title "Root devices" --checklist "Select root OS disks:" $height $width ${window}$devices 2>&1 1>/dev/tty`
boots=`dialog --separate-output --no-cancel --no-items --title "Root devices" --checklist "Select boot drives:" $height $width ${window}$devices 2>&1 1>/dev/tty`
alldisks=`(for d in `echo "$disks"`; do echo "$d"; done; for d in `echo "$boots"`; do echo "$d"; done) | sort -u`
echo "alldisks: $alldisks"
diskcount=`echo "$disks" | wc -l` diskcount=`echo "$disks" | wc -l`
diskoptions="12 35 5 raidz off raidz2 off raidz3 off mirror off none off" diskoptions="12 35 5 raidz off raidz2 off raidz3 off mirror off none off"
if [ "$diskcount" = "0" ] ; then echo "No disks found to use for boot device"; exit 112; fi if [ "$diskcount" = "0" ] ; then echo "No disks found to use for boot device"; exit 112; fi

Loading…
Cancel
Save