verb
This commit is contained in:
parent
ee82c05752
commit
cb7ce3f27e
@ -122,12 +122,10 @@ icons() {
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Sets default verbose mode for script execution.
|
||||
# Sets default verbose mode for script and os execution.
|
||||
# ------------------------------------------------------------------------------
|
||||
VERBOSE="${1:-no}"
|
||||
VERB=${var_verbose:-$VERBOSE}
|
||||
set_std_mode() {
|
||||
if [ "$VERB" = "yes" ]; then
|
||||
if [ "${VERBOSE:-no}" = "yes" ]; then
|
||||
STD=""
|
||||
else
|
||||
STD="silent"
|
||||
@ -136,11 +134,7 @@ set_std_mode() {
|
||||
|
||||
# Silent execution function
|
||||
silent() {
|
||||
if [ "$VERB" = "no" ]; then
|
||||
"$@" >/dev/null 2>&1 || return 1
|
||||
else
|
||||
"$@" || return 1
|
||||
fi
|
||||
"$@" >/dev/null 2>&1
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
@ -56,9 +56,13 @@ function default_settings() {
|
||||
BRG="vmbr0"
|
||||
MAC="$GEN_MAC"
|
||||
VLAN=""
|
||||
VERBOSE="${1:-no}"
|
||||
MTU=""
|
||||
START_VM="yes"
|
||||
METHOD="default"
|
||||
|
||||
VERB=${var_verbose:-$VERBOSE}
|
||||
|
||||
echo -e "${CONTAINERID}${BOLD}${DGN}Virtual Machine ID: ${BGN}${VMID}${CL}"
|
||||
echo -e "${CONTAINERTYPE}${BOLD}${DGN}Machine Type: ${BGN}i440fx${CL}"
|
||||
echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE}${CL}"
|
||||
@ -248,6 +252,13 @@ function advanced_settings() {
|
||||
START_VM="no"
|
||||
fi
|
||||
|
||||
if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then
|
||||
VERBOSE="yes"
|
||||
else
|
||||
VERBOSE="no"
|
||||
fi
|
||||
echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}$VERBOSE${CL}"
|
||||
|
||||
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create a Umbrel OS VM?" --no-button Do-Over 10 58); then
|
||||
echo -e "${CREATING}${BOLD}${DGN}Creating a Umbrel OS VM using the above advanced settings${CL}"
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user