diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index 08d28fea2e..a6cc633095 100755 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -1058,7 +1058,7 @@ Re-enabling HDMI requires a reboot. If you need emergency HDMI output, edit the [[ -e $i ]] || continue i=${i#/dev/} aSTATE[$i]='Off' - systemctl -q is-active "serial-getty@$i" && aSTATE[$i]='On' + systemctl -q is-enabled "serial-getty@$i" || systemctl -q is-active "serial-getty@$i" && aSTATE[$i]='On' G_WHIP_MENU_ARRAY+=("$i console" ": [${aSTATE[$i]}]") done diff --git a/dietpi/func/dietpi-set_hardware b/dietpi/func/dietpi-set_hardware index ae5b219e29..2f76020120 100755 --- a/dietpi/func/dietpi-set_hardware +++ b/dietpi/func/dietpi-set_hardware @@ -1608,17 +1608,17 @@ Do you want to continue and DISABLE Bluetooth now?' || return 1 # - RPi if (( $G_HW_MODEL < 10 )); then - sed -Ei "/root=/s/[[:blank:]]*console=${INPUT_ADDITIONAL}[^[:blank:]]*([[:blank:]]*$)?//" /boot/cmdline.txt + sed -Ei "/root=/s/[[:blank:]]*console=${INPUT_ADDITIONAL}[^[:blank:]]*([[:blank:]]*$)?//g" /boot/cmdline.txt # - Odroid C1/C2/XU4 legacy elif [[ $G_HW_MODEL -le 12 && -f '/boot/boot.ini' ]]; then - sed -i "s/[[:blank:]]*console=${INPUT_ADDITIONAL}[^\"[:blank:]]*//" /boot/boot.ini + sed -i "s/[[:blank:]]*console=${INPUT_ADDITIONAL}[^\"[:blank:]]*//g" /boot/boot.ini # - dietpiEnv.txt elif (( $DIETPIENV )); then - grep -q "^consoleargs=.*console=$INPUT_ADDITIONAL" $FP_UENV && sed -Ei "/^consoleargs=/s/[[:blank:]]*console=${INPUT_ADDITIONAL}[^[:blank:]]*([[:blank:]]*$)?//" $FP_UENV + grep -q "^consoleargs=.*console=$INPUT_ADDITIONAL" $FP_UENV && sed -Ei -e "/^consoleargs=/s/[[:blank:]]*console=${INPUT_ADDITIONAL}[^[:blank:]]*([[:blank:]]*$)?//g" -e 's/^consoleargs=[[:blank:]]+/consoleargs=/' $FP_UENV # - Armbian: armbianEnv.txt only allows to toggle a fixed serial console depending on device elif (( $ARMBIAN )); then @@ -1638,7 +1638,7 @@ Do you want to continue and DISABLE Bluetooth now?' || return 1 elif [[ $G_HW_MODEL == 40 && -f $FP_UENV ]]; then sed -i "/^[[:blank:]]*console=${INPUT_ADDITIONAL}[^\"[:blank:]]*[[:blank:]]*$/d" $FP_UENV # New style: One variable each line - sed -i "s/[[:blank:]]*console=${INPUT_ADDITIONAL}[^\"[:blank:]]*//" $FP_UENV # Old style: Multiple variables possible each line + sed -i "s/[[:blank:]]*console=${INPUT_ADDITIONAL}[^\"[:blank:]]*//g" $FP_UENV # Old style: Multiple variables possible each line fi