Bug#910377: Inhibit reboot/shutdown if dpkg is running
Ansgar
ansgar at debian.org
Wed May 19 15:11:47 BST 2021
Laurent Bigonville writes:
> I'm reopening this issue and reassigning it dpkg package, that would
> at least avoid non privileged users to restart the machine when there
> is an update happening.
For what it's worth apt supports this already when apt invokes dpkg:
```C++
if (_config->FindB("DPkg::Inhibit-Shutdown", true))
Fd = Inhibit("shutdown", "APT", "APT is installing or removing packages", "block");
```
Ansgar
More information about the Pkg-systemd-maintainers
mailing list