Prev |  | Next

## 11. Why doesn’t upsmon send a SIGPWR signal to init so it can deal with power events?

Answer 1

New versions of the `init` man page taken from the sysvinit package are saying that usage of `SIGPWR` is discouraged, since `/dev/initctl` control channel is the preferred way of communication.

Answer 2

The name of the game is portability. Not everyone’s `init` handles that kind of signalling gracefully. What’s more, some admins might want to do things differently even if they have that kind of `init` running.

So, to be compatible, upsmon just invokes a shell command. If you want to use init’s `SIGPWR` stuff, just put the right "kill" line in a shell script and make your `upsmon` call it. Everyone wins.

Prev |  | Next
| Home |