diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index cdb11d1ea7..2c376c2ad3 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -1508,13 +1508,6 @@ _EOF_ G_AGA gawk original-awk "${ae2fsprogs[@]}" unset -v ae2fsprogs - # Workaround for NetworkManager removal, which can leave back a revised /etc/resolv.conf symlink: In case re-create with DietPi default - if [[ ! -f '/etc/resolv.conf' ]] - then - G_EXEC rm -f /etc/resolv.conf - G_EXEC eval 'echo '\''nameserver 9.9.9.9'\'' > /etc/resolv.conf' # Apply generic functional DNS nameserver - fi - #------------------------------------------------------------------------------------------------ G_DIETPI-NOTIFY 3 "$G_PROGRAM_NAME" "[$SETUP_STEP] APT installations"; ((SETUP_STEP++)) #------------------------------------------------------------------------------------------------ @@ -1537,6 +1530,13 @@ _EOF_ [[ -f '/etc/apt/preferences.d/dietpi-armbian-tmp' ]] && G_EXEC rm /etc/apt/preferences.d/dietpi-armbian-tmp [[ -f '/etc/apt/apt.conf.d/dietpi-armbian' ]] && G_EXEC rm /etc/apt/apt.conf.d/dietpi-armbian + # Workaround for NetworkManager removal, which can leave back a revised /etc/resolv.conf symlink: In case re-create with DietPi default + if [[ ! -f '/etc/resolv.conf' ]] + then + G_EXEC rm -f /etc/resolv.conf + G_EXEC eval 'echo '\''nameserver 9.9.9.9'\'' > /etc/resolv.conf' # Apply generic functional DNS nameserver + fi + #------------------------------------------------------------------------------------------------ G_DIETPI-NOTIFY 3 "$G_PROGRAM_NAME" "[$SETUP_STEP] Applying DietPi tweaks and cleanup"; ((SETUP_STEP++)) #------------------------------------------------------------------------------------------------ diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index 4136e15a8e..44ed22332f 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -755,6 +755,7 @@ $grey───────────────────────── then local WHIP_ERROR WHIP_BACKTITLE WHIP_SCROLLTEXT WHIP_SIZE_X WHIP_SIZE_Y WHIP_SIZE_Z WHIP_MESSAGE=$* NOCANCEL=() [[ $G_WHIP_NOCANCEL == 1 ]] && NOCANCEL=('--nocancel') + G_WHIP_BUTTON_OK_TEXT=${G_WHIP_BUTTON_OK_TEXT:-Select} until [[ $G_WHIP_RETURNED_VALUE ]] # Stay in menu if empty option was selected (separator line) do G_WHIP_INIT 2 @@ -783,6 +784,7 @@ $grey───────────────────────── then local WHIP_ERROR WHIP_BACKTITLE WHIP_SCROLLTEXT WHIP_SIZE_X WHIP_SIZE_Y WHIP_SIZE_Z WHIP_MESSAGE=$* NOCANCEL=() [[ $G_WHIP_NOCANCEL == 1 ]] && NOCANCEL=('--nocancel') + G_WHIP_BUTTON_OK_TEXT=${G_WHIP_BUTTON_OK_TEXT:-Confirm} G_WHIP_INIT 3 # shellcheck disable=SC2086 G_WHIP_RETURNED_VALUE=$(whiptail ${G_PROGRAM_NAME:+--title "$G_PROGRAM_NAME"} --backtitle "$WHIP_BACKTITLE | Use spacebar to toggle selection" --checklist "$WHIP_MESSAGE" --separate-output --ok-button "$G_WHIP_BUTTON_OK_TEXT" --cancel-button "$G_WHIP_BUTTON_CANCEL_TEXT" "${NOCANCEL[@]}" --default-item "$G_WHIP_DEFAULT_ITEM" $WHIP_SCROLLTEXT "$WHIP_SIZE_Y" "$WHIP_SIZE_X" "$WHIP_SIZE_Z" -- "${G_WHIP_CHECKLIST_ARRAY[@]}" 3>&1 1>&2 2>&3-; echo $? > /tmp/.WHIP_CHECKLIST_RESULT)