Add support to NMSettingConnection.down-on-poweroff
Summary
Add support to NMSettingConnection.down-on-poweroff, in addition, reworking nm-sleep-monitor.c to nm-power-monitor.c.
Purpose
The new option at NMSettingConnection allow the user to specify if the connection needs to be down when powering off the system. This is useful for IP address removal prior powering off. In order to accomplish that, we listen on "Shutdown" systemd DBus signal.
Checklist
Please read https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/CONTRIBUTING.md before opening the merge request. In particular, check that:
-
the subject for all commits is concise and explicative -
the message for all commits explains the reason for the change -
the source is properly formatted -
any relevant documentation is up to date