From 28cce8d24cc9880c329fb26467fa49ca7f2fd85a Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 8 Mar 2022 10:04:30 -0500 Subject: [PATCH] Update ubuntu.sh --- ct/ubuntu.sh | 57 +++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 45 insertions(+), 12 deletions(-) diff --git a/ct/ubuntu.sh b/ct/ubuntu.sh index 538c93a4..9c8ef3be 100644 --- a/ct/ubuntu.sh +++ b/ct/ubuntu.sh @@ -27,18 +27,6 @@ ${CL}" } header_info -show_menu(){ - printf " ${YW} 1)${YW} Privileged ${CL}\n" - printf " ${YW} 2)${GN} Unprivileged ${CL}\n" - - printf "Please choose a Install Method and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked(){ - message=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message}${CL}\n" -} show_menu while [ $opt != '' ] do @@ -70,6 +58,50 @@ while [ $opt != '' ] esac fi done +show_menu2(){ + printf " ${YW} 1)${GN} Use Automatic Login ${CL}\n" + printf " ${YW} 2)${GN} Use Password (changeme) ${CL}\n" + + printf "Please choose a Password Type and hit enter or ${RD}x${CL} to exit." + read opt +} + +option_picked(){ + message=${@:-"${CL}Error: No message passed"} + printf " ${YW}${message1}${CL}\n" + printf " ${YW}${message}${CL}\n" +} +show_menu2 +while [ $opt != '' ] + do + if [ $opt = '' ]; then + exit; + else + case $opt in + 1) clear; + header_info; + option_picked "Using Automatic Login"; + PW=" " + break; + ;; + 2) clear; + header_info; + option_picked "Using Password (changeme)"; + PW="-password changeme" + break; + ;; + + x)exit; + ;; + \n)exit; + ;; + *)clear; + option_picked "Please choose a Password Type from the menu"; + show_menu2; + ;; + esac + fi + done set -o errexit set -o errtrace @@ -138,6 +170,7 @@ export PCT_OPTIONS=" -cores 1 -memory 512 -unprivileged ${IM} + ${PW} " bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit