Skip to content

Selecting "No" at UART Disable prompt disables UART anyway. #7658

@nullstalgia

Description

@nullstalgia

Creating a bug report/issue

  • I have searched the existing open and closed issues

Required Information

  • DietPi version | 9.15

Steps to reproduce

  1. During first time setup on a Raspberry Pi (I tried a 1B and 3), select Yes or No on the UART Disable prompt.
  2. After setup completes, go to dietpi-config and observe it always being disabled.

It appears to ask the user, and then check the dietpi.txt for the same option.

When selecting Yes:

...
[ SUB1 ] DietPi-Set_hardware > serialconsole (disable)
[ INFO ] DietPi-Set_hardware | Disabling serial-getty on: /dev/serial0
[  OK  ] DietPi-Set_hardware | systemctl unmask serial-getty@serial0
[  OK  ] DietPi-Set_hardware | systemctl disable --now serial-getty@serial0
[  OK  ] DietPi-Set_hardware | Desired setting in /boot/config.txt was already set: enable_uart=0
[  OK  ] DietPi-Set_hardware | Setting in /boot/dietpi.txt adjusted: CONFIG_SERIAL_CONSOLE_ENABLE=0
[  OK  ] serialconsole disable | Completed
[ SUB1 ] DietPi-Set_hardware > serialconsole (disable)
[ INFO ] DietPi-Set_hardware | Disabling serial-getty on: /dev/serial0
[  OK  ] DietPi-Set_hardware | systemctl unmask serial-getty@serial0
[  OK  ] DietPi-Set_hardware | systemctl disable --now serial-getty@serial0
[  OK  ] serialconsole disable | Completed
[  OK  ] DietPi-Software | mount -o remount /var/log
...

When selecting No:

...
[ SUB1 ] DietPi-Set_hardware > serialconsole (disable)
[ INFO ] DietPi-Set_hardware | Disabling serial-getty on: /dev/serial0
[  OK  ] DietPi-Set_hardware | systemctl unmask serial-getty@serial0
[  OK  ] DietPi-Set_hardware | systemctl disable --now serial-getty@serial0
[  OK  ] serialconsole disable | Completed
[  OK  ] DietPi-Software | mount -o remount /var/log
...

What was expected:

The prompt should respect the user's most recent choice, and should not fall back to a config option if it just got an answer from the user directly.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions