[Pkg-acpi-devel] Bug#699810: Bug#699810: shutdown via power button broken with systemd

Michael Biebl biebl at debian.org
Fri Feb 15 13:36:52 UTC 2013


Hi Michael,

On 05.02.2013 15:25, Michael Meskes wrote:
>> Michael, if you want me to review the relevant changes or provide a
>> patch, just let me know.
> 
> A patch would be great. Thanks.

The patch would basically be as simple as:

diff --git a/debian/acpid.service b/debian/acpid.service
index 733edc9..b998711 100644
--- a/debian/acpid.service
+++ b/debian/acpid.service
@@ -5,3 +5,6 @@ Requires=acpid.socket
 [Service]
 StandardInput=socket
 ExecStart=/usr/sbin/acpid
+
+[Install]
+WantedBy=multi-user.target

This way acpid is also started via multi-user.target, which basically is
runlevel 2-5 in Debian.

I could have added "Also=acpid.socket" to the [Install] section.
What that does is, that a "systemctl enable acpid.service" also enables
the corresponding socket unit (and vice versa for disable)
In case of acpid it might make sense that the service and socket unit
can be enabled and disabled independently, e.g. for people which only
need acpid to be running on-demand. If you don't think there is a
use-case for that, you can decide to add the Also=acpid.socket line.

In case you were wondering why I didn't update debian/acpid.links: The
reason why this is not necessary, are the changes in systemd 44-9 [1]
which will automatically enable systemd units and sockets. So if you
want, you can actually drop debian/acpid.links again.

Cheers,
Michael

[1]
http://anonscm.debian.org/gitweb/?p=pkg-systemd/systemd.git;a=commitdiff;h=d7e578179529

-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 900 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-acpi-devel/attachments/20130215/def5b264/attachment.pgp>


More information about the Pkg-acpi-devel mailing list