mirror of
https://github.com/tteck/Proxmox.git
synced 2024-11-29 18:13:10 +01:00
Update build.func
tweak
This commit is contained in:
parent
cfd4c979a1
commit
c073351b4c
@ -232,23 +232,28 @@ advanced_settings() {
|
|||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
if PW1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then
|
if PW1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then
|
||||||
if [ -z "$PW1" ]; then
|
if [[ ! -z "$PW1" ]]; then
|
||||||
PW1="Automatic Login"
|
if [[ "$PW1" == *" "* ]]; then
|
||||||
PW=""
|
|
||||||
elif [[ "$PW1" == *" "* ]]; then
|
|
||||||
whiptail --msgbox "Password cannot contain spaces. Please try again." 8 58
|
whiptail --msgbox "Password cannot contain spaces. Please try again." 8 58
|
||||||
elif [ ${#PW1} -ge 1 ] && [ ${#PW1} -lt 5 ]; then
|
elif [ ${#PW1} -lt 5 ]; then
|
||||||
whiptail --msgbox "Password must be at least 5 characters long. Please try again." 8 58
|
whiptail --msgbox "Password must be at least 5 characters long. Please try again." 8 58
|
||||||
else
|
else
|
||||||
PW="-password $PW1"
|
PW="-password $PW1"
|
||||||
echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
|
echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
PW1="Automatic Login"
|
||||||
|
PW=""
|
||||||
|
echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
|
||||||
|
break
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
if CT_ID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then
|
if CT_ID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then
|
||||||
if [ -z "$CT_ID" ]; then
|
if [ -z "$CT_ID" ]; then
|
||||||
CT_ID="$NEXTID"
|
CT_ID="$NEXTID"
|
||||||
|
Loading…
Reference in New Issue
Block a user