pkg/login1: initial commit
This commit adds login1 package, which is a small subset of github.com/coreos/go-systemd/v22/login1 package with ability to use shared D-Bus connection and with proper error handling for Reboot method call, which is not yet provided by the upstream.
The idea is to use this package in favor of github.com/coreos/go-systemd in agent code responsible for rebooting the node. However, this requires tests in agent code, so it will be done in the next step.
See https://github.com/coreos/go-systemd/issues/387 for more details.
Signed-off-by: Mateusz Gozdek [email protected]
This PR will become relevant once we have enough test code for agent to add checking for reboot errors.
Attempt to submit this code upstream: https://github.com/coreos/go-systemd/pull/390.