different whiptail warning if ubuntu 20.04

This commit is contained in:
m0duspwnens
2023-07-17 15:56:29 -04:00
parent 425ca35a22
commit 5d4186ac07
3 changed files with 36 additions and 5 deletions

View File

@@ -417,7 +417,7 @@ set_minionid() {
}
set_palette() {
if [[ $is_ubuntu ]]; then
if [[ $is_deb ]]; then
update-alternatives --set newt-palette /etc/newt/palette.original
fi
}

View File

@@ -69,12 +69,21 @@ detect_os
set_palette >> $setup_log 2>&1
if [[ $not_supported ]]; then
if [[ "$OSVER" == "focal" ]]; then
if (whiptail_focal_warning); then
true
else
info "User cancelled setup."
whiptail_cancel
fi
else
if (whiptail_unsupported_os_warning); then
true
else
info "User cancelled setup."
whiptail_cancel
fi
fi
fi
# Check to see if this is the setup type of "desktop".

View File

@@ -455,6 +455,28 @@ __append_end_msg() {
EOM
}
whiptail_focal_warning() {
[ -n "$TESTING" ] && return
read -r -d '' focal_warning_continue <<- EOM
WARNING: Ubuntu 20.04 is only supported as a minion role.
This node may not install or operate as expected if installed
as a manager, managersearch, standalone, eval, or import.
Would you like to continue the install?
EOM
whiptail --title "$whiptail_title" \
--yesno "$focal_warning_continue" 14 75 --defaultno
local exitstatus=$?
return $exitstatus
}
whiptail_gauge_post_setup() {
if [ -n "$TESTING" ]; then