No matter how I launch a shutdown (shutdown, shutdown -h now, nohup shutdown -h now, etc) my Raspberry always reboot after 40-50 seconds from the command (apparently, as soon as the poweroff cycle is ended).
I need an affordable way to shutdown the device before cutting power, as I am using it headless.
This is a Raspi 3b+ running Bookworm
uname -a
Linux pab 6.6.31+rpt-rpi-v7 #1 SMP Raspbian 1:6.6.31-1+rpt1 (2024-05-29) armv7l GNU/Linux
EDIT:
This is an excerpt from syslog, after the poweroff command was issued at 12:01:
Aug 19 12:01:48 pab systemd[1]: Stopping minissdpd.service - keep memory of all UPnP devices that announced themselves...
Aug 19 12:01:48 pab mopidy[799]: INFO [MainThread] mopidy.commands GLib mainloop got SIGTERM. Exiting...
Aug 19 12:01:48 pab listen_for_AC.sh[1012]: Stopping listen_for_AC.py
Aug 19 12:01:48 pab systemd[1]: Stopping mopidy.service - Mopidy music server...
Aug 19 12:01:48 pab mopidy[799]: INFO [MainThread] mopidy.commands Stopping Mopidy frontends
Aug 19 12:01:48 pab systemd[1]: Starting plymouth-poweroff.service - Show Plymouth Power Off Screen...
Aug 19 12:01:48 pab mopidy[799]: INFO [IrisFrontend-14 (_actor_loop)] mopidy_iris.core Stopping Iris
Aug 19 12:01:59 pab kernel: [ 0.000000] Booting Linux on physical CPU 0x0
Aug 19 12:01:59 pab kernel: [ 0.000000] Linux version 6.6.31+rpt-rpi-v7 ([email protected]) (gcc-12 (Raspbian 12.2.0-14+rpi1) 12.2.0, GNU ld (GNU Binutils for Raspbian) 2.40) #1 SMP Raspbian 1:6.6.31-1+rpt1 (2024-05-29)
As you can see, at 12:01:59 the system is rebooting, and it runs until full reboot.