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

Add some extra warning when switching to nightly, enable switching to nightly...

Add some extra warning when switching to nightly, enable switching to nightly when kernel packages are not frozen, readme update
parent 2a5aad6c
...@@ -12,9 +12,11 @@ It comes with Armbian (from 5.27) by default. Login as super user and type: ...@@ -12,9 +12,11 @@ It comes with Armbian (from 5.27) by default. Login as super user and type:
- wireless network connect, - wireless network connect,
- AP (hotspot) in bridged or NAT mode, - AP (hotspot) in bridged or NAT mode,
- edit boot environment, network, FEX - edit boot environment, network, FEX, welcome screen items,
- switching between kernels and nightly builds, - switching between kernels and nightly builds,
- exclude / include kernel and BSP packages from upgrading,
- enabling read only root filesystem (Ubuntu only), - enabling read only root filesystem (Ubuntu only),
- set display resolution (H3 boards with legacy kernel),
**Installation** **Installation**
...@@ -25,7 +27,7 @@ It comes with Armbian (from 5.27) by default. Login as super user and type: ...@@ -25,7 +27,7 @@ It comes with Armbian (from 5.27) by default. Login as super user and type:
- [ISPConfig](https://www.ispconfig.org/) *(WEB & MAIL server)* - [ISPConfig](https://www.ispconfig.org/) *(WEB & MAIL server)*
- [Openmediavault NAS](http://www.openmediavault.org/) *(NAS server)* - [Openmediavault NAS](http://www.openmediavault.org/) *(NAS server)*
- [PI hole](https://pi-hole.net) *(ad blocker)* - [PI hole](https://pi-hole.net) *(ad blocker)*
- [MiniDLNA](http://minidlna.sourceforge.net/) *(media sharing) - [MiniDLNA](http://minidlna.sourceforge.net/) *(media sharing)*
[Project realisation example](http://www.igorpecovnik.com/2013/12/10/micro-home-server/) [Project realisation example](http://www.igorpecovnik.com/2013/12/10/micro-home-server/)
......
...@@ -186,8 +186,10 @@ fi ...@@ -186,8 +186,10 @@ fi
LIST+=( "Network" "Edit network settings" ) LIST+=( "Network" "Edit network settings" )
LIST+=( "Services" "Toggle running services" ) LIST+=( "Services" "Toggle running services" )
LIST+=( "Welcome" "Toogle welcome screen items" ) LIST+=( "Welcome" "Toogle welcome screen items" )
[[ -f /etc/apt/sources.list.d/armbian.list ]] && [[ -n $(grep -w apt /etc/apt/sources.list.d/armbian.list) ]] && LIST+=( "Nightly" "Switch to daily builds" ) if [[ -z $(apt-mark showhold | grep -w "$BOARD") ]]; then
[[ -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" ) [[ -f /etc/apt/sources.list.d/armbian.list ]] && [[ -n $(grep -w apt /etc/apt/sources.list.d/armbian.list) ]] && LIST+=( "Nightly" "Switch to daily builds" )
[[ -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" )
fi
[[ $(apt-cache search --names-only '^linux-'$(lsb_release -cs)'-root.*.'$BOARD'*' | sed 's/.*(\(.*\))/\1/' | awk '{print $1}' | wc -l) -gt 1 ]] && LIST+=( "Switch" "Switch to alternative kernels" ) [[ $(apt-cache search --names-only '^linux-'$(lsb_release -cs)'-root.*.'$BOARD'*' | sed 's/.*(\(.*\))/\1/' | awk '{print $1}' | wc -l) -gt 1 ]] && LIST+=( "Switch" "Switch to alternative kernels" )
[[ "$DISTRO" == "Ubuntu" && "$(modinfo overlay > /dev/null 2>&1; echo $?)" == "0" ]] && LIST+=( "Overlayroot" "Toggle virtual read-only root filesystem" ) [[ "$DISTRO" == "Ubuntu" && "$(modinfo overlay > /dev/null 2>&1; echo $?)" == "0" ]] && LIST+=( "Overlayroot" "Toggle virtual read-only root filesystem" )
...@@ -442,12 +444,14 @@ DIALOG_ESC=255 ...@@ -442,12 +444,14 @@ DIALOG_ESC=255
;; ;;
"Nightly" ) "Nightly" )
dialog --title "Warning" --backtitle "$BACKTITLE" --yes-label "OK" --no-label "Cancel" --yesno "\nYou are switching to automated daily build which is untested and might break your system. Are you fine with that?" 9 44
if [[ $? = 0 ]]; then
sed -i 's/apt.armbian.com/beta.armbian.com/' /etc/apt/sources.list.d/armbian.list sed -i 's/apt.armbian.com/beta.armbian.com/' /etc/apt/sources.list.d/armbian.list
debconf-apt-progress -- apt-get update debconf-apt-progress -- apt-get update
debconf-apt-progress -- apt-get -y upgrade debconf-apt-progress -- apt-get -y upgrade
dialog --title "Switching to nightly" --backtitle "$BACKTITLE" --yes-label "Reboot" --no-label "Cancel" --yesno \ dialog --title "Switching to nightly" --backtitle "$BACKTITLE" --yes-label "Reboot" --no-label "Cancel" --yesno "\nReboot to apply new settings?" 7 34
"\nReboot to apply new settings?" 7 34
if [[ $? = 0 ]]; then reboot; fi if [[ $? = 0 ]]; then reboot; fi
fi
;; ;;
"Stable" ) "Stable" )
......
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