diff --git a/setup.sh b/setup.sh index 9ac8316..cbc6f69 100644 --- a/setup.sh +++ b/setup.sh @@ -26,11 +26,14 @@ width=`tput cols` height=`tput lines` # set line separator -IFS=$'\n' +hold="$IFS"; IFS=$'\n' devices=""; for device in $(ls /dev/disk/by-id | grep -v part); do devices="$devices $device off"; done +IFS="$hold" disks=`dialog --separate-output --no-cancel --no-items --title "Root devices" --checklist "Select boot drives" $height $width ${window}$devices 2>&1 1>/dev/tty` hostname=""; while [ -z "$hostname" ]; do hostname=`dialog --no-cancel --inputbox "Host name/Server name" 8 100 2>&1 >/dev/tty`; done +IFS=$'\n' nicdevices=""; for nic in $(ip -o link show | awk -F': ' '{print $2}' | grep -v '^lo'); do nicdevices="$nicdevices $nic off"; done +IFS="$hold" nics=`dialog --separate-output --no-cancel --no-items --title "Network devices for bridge" --checklist "Select the network devices to be bridged" $height $width ${window}$nicdevices 2>&1 1>/dev/tty` for disk in "$disks"; do