Skip to content

Commit

Permalink
v9.9
Browse files Browse the repository at this point in the history
- DietPi-Globals | G_WHIP: Change default ok/yes button text of menus to "Select" and checkbox menus to "Confirm"
- DietPi-Installer | Move NetworkManager workaround to the right place
  • Loading branch information
MichaIng committed Dec 5, 2024
1 parent 4529275 commit 8dcf6cc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .build/images/dietpi-installer
Original file line number Diff line number Diff line change
Expand Up @@ -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++))
#------------------------------------------------------------------------------------------------
Expand All @@ -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++))
#------------------------------------------------------------------------------------------------
Expand Down
2 changes: 2 additions & 0 deletions dietpi/func/dietpi-globals
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 8dcf6cc

Please sign in to comment.