Yes but why doesnt âsudo rebootâ just do what its supposed to?
And given that it doenst how do i fix it?
echo âhello worldâ | sudo wall
Doesnt display any messages so manually fixing the ârebootâ alias doesnt fix anything
I dont understand why dietpi now out of the box deliberately changes default behaviour so that the message is suppressed and the ssh session doesnt disconnect
The SSH sessions and SFTP sessions eventually disconnect themselves, but they dont get the âexitâ/âThe system is going down for system reboot NOW!â message so dont exit cleanly.
I dont want my ssh session to stall until it decides it can disconnect. Particularly when there is a linux process which should be implemented to disconnect and save bash_local and whatever else happens when a clean reboot is performed.
Im not sure why the devs of dietpi thought disabling the thing which kills active connections when someone requests a reboot was a good idea.
But not killing active SSH connections on reboot is absolutely a bug.
Iâve got a clean SSH disconnect now but no wall.
I can see a wall message and I should have already aliased reboot but its not working:
\home\dietpi\.bashrc
alias reboot='echo "The system is going down for system reboot NOW!" | sudo wall ; /usr/bin/sudo /bin/systemctl --force reboot'
alias poweroff='echo "The system is going down for system halt NOW!" | sudo wall ; /usr/bin/sudo /bin/systemctl --force poweroff'
[Unit]
Description=Broadcast message before reboot
Before=reboot.target
DefaultDependencies=no
[Service]
Type=oneshot
ExecStart=/usr/bin/wall "đ System is rebooting now. Please save your work."
[Install]
WantedBy=reboot.target
and do
sudo systemctl enable pre-reboot-message.service
This ensures any reboot â whether from reboot, shutdown -r, or systemctl reboot â will show a message first.
Like you kind of need to know if you get booted off the network that there is a reason?
I dont understand the rationalle for disabling this message and not having a config option to re-enable it for multi user environments.
(and graceful exit, which is the important part)
root@DietPi5:~# shutdown -r
Reboot scheduled for Tue 2025-10-07 22:08:13 CEST, use 'shutdown -c' to cancel.
root@DietPi5:~#
client 2 receiving the message
root@DietPi5:~#
Broadcast message from root@DietPi5 on pts/0 (Tue 2025-10-07 22:07:13 CEST):
The system will reboot at Tue 2025-10-07 22:08:13 CEST!
root@DietPi5:~#