Modify arguments to do_serial to enable hardware to be set independently of console.

This commit is contained in:
Simon Long 2018-04-30 11:04:26 +01:00
parent 8cd873813d
commit d6d9ecc0d9

View File

@ -868,7 +868,7 @@ do_serial() {
set_config_var enable_uart 1 $CONFIG set_config_var enable_uart 1 $CONFIG
SSTATUS=enabled SSTATUS=enabled
HSTATUS=enabled HSTATUS=enabled
elif [ $RET -eq 1 ]; then elif [ $RET -eq 1 ] || [ $RET -eq 2 ]; then
sed -i $CMDLINE -e "s/console=ttyAMA0,[0-9]\+ //" sed -i $CMDLINE -e "s/console=ttyAMA0,[0-9]\+ //"
sed -i $CMDLINE -e "s/console=serial0,[0-9]\+ //" sed -i $CMDLINE -e "s/console=serial0,[0-9]\+ //"
SSTATUS=disabled SSTATUS=disabled
@ -876,7 +876,7 @@ do_serial() {
whiptail --yesno "Would you like the serial port hardware to be enabled?" $DEFAULTH 20 60 2 whiptail --yesno "Would you like the serial port hardware to be enabled?" $DEFAULTH 20 60 2
RET=$? RET=$?
else else
RET=1 RET=$((2-$RET))
fi fi
if [ $RET -eq $CURRENTH ]; then if [ $RET -eq $CURRENTH ]; then
ASK_TO_REBOOT=1 ASK_TO_REBOOT=1