From 5e83fbf3d271a2f63d16c404b5f7797da2c31523 Mon Sep 17 00:00:00 2001 From: sean Date: Tue, 9 Jul 2019 13:14:26 -0700 Subject: [PATCH] tweaks --- README.md | 2 +- setup.sh | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index bd1b794..03bd9d5 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,4 @@ Server Setup Script ===================== #Use# -wget -qO - https://code.totosearch.org/Sean/ServerSetup/setup.sh | sudo bash +wget -qO - https://code.totosearch.org/Sean/ServerSetup/raw/branch/master/setup.sh | sudo bash diff --git a/setup.sh b/setup.sh index cbc6f69..cd36d5e 100644 --- a/setup.sh +++ b/setup.sh @@ -24,16 +24,12 @@ fi #calculate width and height of console width=`tput cols` height=`tput lines` - +window=$((height - 5)) # set line separator -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