Commit bed100a9 authored by Igor Pecovnik's avatar Igor Pecovnik
Browse files

Bugfixes when displaying alternative kernel options and disabling Save and...

Bugfixes when displaying alternative kernel options and disabling Save and reboot from editbox since content is not save when hitting "help" button.
parent 9ea2ebb2
...@@ -239,8 +239,8 @@ while true; do ...@@ -239,8 +239,8 @@ while true; do
[[ -f /etc/apt/sources.list.d/armbian.list ]] && [[ -n $(grep -w beta /etc/apt/sources.list.d/armbian.list) ]] \ [[ -f /etc/apt/sources.list.d/armbian.list ]] && [[ -n $(grep -w beta /etc/apt/sources.list.d/armbian.list) ]] \
&& LIST+=( "Stable" "Switch to stable builds" ) && LIST+=( "Stable" "Switch to stable builds" )
fi fi
[[ $(apt-cache search --names-only '^linux-'$(lsb_release -cs)'-root.*.'$BOARD'*' | sed 's/.*(\(.*\))/\1/' | \ [[ $(apt-cache search --names-only '^linux-'$(lsb_release -cs)'-root.*.'$BOARD'' | sed 's/.*(\(.*\))/\1/' | awk '{print $1}' \
awk '{print $1}' | wc -l) -gt 1 ]] && LIST+=( "Switch" "Switch to alternative kernels" ) | wc -l) -gt 1 ]] && LIST+=( "Switch" "Switch to alternative kernels" )
[[ "$DISTRO" == "Ubuntu" && "$(modinfo overlay > /dev/null 2>&1; echo $?)" == "0" ]] && \ [[ "$DISTRO" == "Ubuntu" && "$(modinfo overlay > /dev/null 2>&1; echo $?)" == "0" ]] && \
LIST+=( "Overlayroot" "Toggle virtual read-only root filesystem" ) LIST+=( "Overlayroot" "Toggle virtual read-only root filesystem" )
...@@ -355,11 +355,9 @@ while true; do ...@@ -355,11 +355,9 @@ while true; do
TEMP=$(mktemp -d || exit 1) TEMP=$(mktemp -d || exit 1)
trap "rm -rf \"${TEMP}\" ; exit 0" 0 1 2 3 15 trap "rm -rf \"${TEMP}\" ; exit 0" 0 1 2 3 15
bin2fex /boot/script.bin ${TEMP}/tempfex.txt >/dev/null 2>&1 bin2fex /boot/script.bin ${TEMP}/tempfex.txt >/dev/null 2>&1
dialog --title "Edit u-boot environment" --help-button --help-label "Save & reboot" \ dialog --title "Edit u-boot environment" \
--ok-label "Save" --no-collapse --editbox ${TEMP}/tempfex.txt 40 0 2> ${TEMP}/tempfex.out --ok-label "Save" --no-collapse --editbox ${TEMP}/tempfex.txt 40 0 2> ${TEMP}/tempfex.out
exitstatus=$?; [[ $? = 0 ]] && fex2bin ${TEMP}/tempfex.out /boot/script.bin
[[ $exitstatus = 0 ]] && fex2bin ${TEMP}/tempfex.out /boot/script.bin
[[ $exitstatus = 2 ]] && fex2bin ${TEMP}/tempfex.out /boot/script.bin && reboot
;; ;;
...@@ -402,11 +400,9 @@ while true; do ...@@ -402,11 +400,9 @@ while true; do
# Edit network settings # Edit network settings
# #
"Network" ) "Network" )
dialog --backtitle "$BACKTITLE" --title "Edit network configuration" --no-collapse --help-button --help-label "Save & reboot" \ dialog --backtitle "$BACKTITLE" --title "Edit network configuration" --no-collapse \
--ok-label "Save" --editbox /etc/network/interfaces 30 0 2> /etc/network/interfaces.out --ok-label "Save" --editbox /etc/network/interfaces 30 0 2> /etc/network/interfaces.out
exitstatus=$?; [[ $? = 0 ]] && mv /etc/network/interfaces.out /etc/network/interfaces && service network-manager restart
[[ $exitstatus = 0 ]] && mv /etc/network/interfaces.out /etc/network/interfaces && service network-manager restart
[[ $exitstatus = 2 ]] && mv /etc/network/interfaces.out /etc/network/interfaces && reboot
;; ;;
# Create WiFi access point # Create WiFi access point
...@@ -540,11 +536,9 @@ while true; do ...@@ -540,11 +536,9 @@ while true; do
# Edit boot environment # Edit boot environment
# #
"Booting" ) "Booting" )
dialog --title "Edit u-boot environment" --help-button --help-label "Save & reboot" --ok-label "Save" \ dialog --title "Edit u-boot environment" --ok-label "Save" \
--no-collapse --editbox /boot/armbianEnv.txt 30 0 2> /boot/armbianEnv.txt.out --no-collapse --editbox /boot/armbianEnv.txt 30 0 2> /boot/armbianEnv.txt.out
exitstatus=$?; [[ $? = 0 ]] && mv /boot/armbianEnv.txt.out /boot/armbianEnv.txt
[[ $exitstatus = 0 ]] && mv /boot/armbianEnv.txt.out /boot/armbianEnv.txt
[[ $exitstatus = 2 ]] && mv /boot/armbianEnv.txt.out /boot/armbianEnv.txt && reboot
;; ;;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment