RPi-Distro / raspi-config

Configuration tool for the Raspberry Pi
Other
565 stars 206 forks source link

do_update with nonint enters interactive mode #213

Closed m5p3nc3r closed 3 months ago

m5p3nc3r commented 1 year ago

When trying to script usage of raspi-config, I wanted to ensure that the raspi-config tool was up to date. The problem is that issuing the command

raspi-conifg nonint do_update

goes through the process of relaunching raspi-config into interactive mode.

The expected behaviour should be to return to the console prompt.

XECDesign commented 1 year ago

nonint is only intended for use by other official scripts. I don't think we use do_update in nonint mode anywhere, but if you'd like to send a PR, I don't see why we couldn't merge it.

m5p3nc3r commented 1 year ago

Understood - I have created PR #214

SpencerGraffunder commented 10 months ago

It seems in doing some updates for Pi 5, the script has also removed the nonint feature from do_serial() (there used to be a nonint check after line 1186). It would be nice for that to be added back!

lurch commented 3 months ago

214 has been merged, so I guess this issue can be closed?

@SpencerGraffunder see my comment in #224

SpencerGraffunder commented 3 months ago

I found the workaround of using do_serial_hw and do_serial_cons separately, so as far as I’m concerned it can be closed. Seems like it shouldn’t have changed for backwards compatibility though.

lurch commented 3 months ago

Seems like it shouldn’t have changed for backwards compatibility though.

I don't think that raspi-config has ever claimed to have a stable API? IIRC the non-interactive mode has always been "use this at your own risk" :wink:

Perhaps that should be made more clear at https://www.raspberrypi.com/documentation/computers/configuration.html#raspi-config-cli @nathan-contino ?