PDA

View Full Version : Inhibit Broadcast Messages from shutdown(8) command?



johol
05-Jul-2012, 12:03
Hi,

Is it possible (and if so how do I do) to inhibit the Broadcast Messages sent by the shutdown command to all terminals with user processes attached to them?

As I understand it, shutdown(8) in SysVInit reads from /var/run/utmp via getutent(3) to find out which terminals has user processes associated with them, and then it sends Broadcast Messages to those terminals...

We have a machine-machine interface to a HA SLES machine and getting unexpected Broadcast Messages complicates things a lot. :(

jmozdzen
05-Jul-2012, 15:08
Hi johol,

afaik this is hardcoded within the shutdown command and those messages cannot be supressed by users.

A work-around could be to directly tell "init" to go to the required level (0 for halt, 6 for reboot), iirc this is basically what "shutdown(8)" does after waiting and sending the messages. OTOH you could fetch the source of "shutdown" and re-code to avoid those messages...

Regards,
Jens