Commit 30fbed76 authored by Igor Pecovnik's avatar Igor Pecovnik
Browse files

Option to disable lowlevel kernel messages

parent d32368b2
...@@ -94,7 +94,7 @@ if [[ -f /etc/update-motd.d/41-armbian-config ]]; then ...@@ -94,7 +94,7 @@ if [[ -f /etc/update-motd.d/41-armbian-config ]]; then
[[ ! -x /etc/update-motd.d/41-armbian-config ]] && LIST+=( "Add" "Add armbian-config to welcome screen" ) [[ ! -x /etc/update-motd.d/41-armbian-config ]] && LIST+=( "Add" "Add armbian-config to welcome screen" )
fi fi
[[ -f /usr/bin/bin2fex && "$LINUXFAMILY" = sun*i && "$BRANCH" = "default" ]] && LIST+=( "Fexedit" "Board (fex) settings editor" ) [[ -f /usr/bin/bin2fex && "$LINUXFAMILY" = sun*i && "$BRANCH" = "default" ]] && LIST+=( "Fexedit" "Board (fex) settings editor" )
[[ -n $(grep -w "#kernel.printk" /etc/sysctl.conf ) ]] && LIST+=( "Lowlevel" "Stop low-level messages on console" )
[[ -f /usr/bin/h3disp && "$LINUXFAMILY" = "sun8i" && "$BRANCH" = "default" && -n $(bin2fex </boot/script.bin 2>/dev/null | grep -w "hdmi_used = 1") ]] && LIST+=( "Display" "set the display resolution" ) [[ -f /usr/bin/h3disp && "$LINUXFAMILY" = "sun8i" && "$BRANCH" = "default" && -n $(bin2fex </boot/script.bin 2>/dev/null | grep -w "hdmi_used = 1") ]] && LIST+=( "Display" "set the display resolution" )
[[ -n $(nmcli -f DEVICE,TYPE device status | grep wifi) ]] && LIST+=( "Wireless" "Connect to your router" ) [[ -n $(nmcli -f DEVICE,TYPE device status | grep wifi) ]] && LIST+=( "Wireless" "Connect to your router" )
[[ -n $(grep -w apt /etc/apt/sources.list.d/armbian.list) ]] && LIST+=( "Nightly" "Switch to daily builds" ) [[ -n $(grep -w apt /etc/apt/sources.list.d/armbian.list) ]] && LIST+=( "Nightly" "Switch to daily builds" )
...@@ -161,6 +161,13 @@ while true; do ...@@ -161,6 +161,13 @@ while true; do
rcconf rcconf
;; ;;
"Lowlevel" )
dialog --title "Kernel messages" --backtitle "$BACKTITLE" --help-button --help-label "Yes & reboot" --yes-label "Yes" --no-label "Cancel" --yesno "\nStop low-level messages on console?" 7 64
exitstatus=$?;
[[ $exitstatus = 0 ]] && sed -i 's/^#kernel.printk\(.*\)/kernel.printk\1/' /etc/sysctl.conf
[[ $exitstatus = 2 ]] && sed -i 's/^#kernel.printk\(.*\)/kernel.printk\1/' /etc/sysctl.conf && reboot
;;
"Overlayroot" ) "Overlayroot" )
if [[ -n $(mount | grep -w overlay) ]]; then if [[ -n $(mount | grep -w overlay) ]]; then
dialog --title "Root overlay" --backtitle "$BACKTITLE" --yes-label "Disable" --no-label "Cancel" --yesno "\nYour system is already virtual read-only.\n\nDo you want to disable this feature and reboot?" 9 60 dialog --title "Root overlay" --backtitle "$BACKTITLE" --yes-label "Disable" --no-label "Cancel" --yesno "\nYour system is already virtual read-only.\n\nDo you want to disable this feature and reboot?" 9 60
......
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