Closed EuanKerr closed 3 months ago
Just adding my US$.02 on this.
Since do_serial
doesn't honor nonint
, code that needs it to is forced to do it themselves. Not a really great solution.
See the comment here about using the non-interactive serial-config functions https://github.com/RPi-Distro/raspi-config/commit/a5bd201044510a208ac481829fd4dd18f915ad47#r141412962
do_serial should only be used interactively, as it makes multiple configuration changes, to both hardware and console.
If you want to make serial changes non-interactively, they should be made using the separate functions do_serial_hw to enable or disable the hardware, and do_serial_cons to enable or disable the console. This makes it a lot more obvious what is actually being set.
Interactive if statements were removed in a recent change - this adds them back in so nonint runs don't get prompted with whiptail.
These were removed in https://github.com/RPi-Distro/raspi-config/commit/a5bd201044510a208ac481829fd4dd18f915ad47#diff-3840729c184b09759334e4011cf6834fab101e0bc3534f8989dd135f81e6d53eL1187-L1192