Am 06.07.2015 um 09:29 schrieb Ritesh Raj Sarraf:
> So I updated the .service file to add a ExecReload= condition. This will
> fill in the equivalent of the udev rules calls that I had been invoking,
> because there I called "/usr/bin/laptop_mode auto", which is supposed to
> just kinda reload.

..

> rrs@learner:~$ cat /lib/udev/lmt-udev
> #!/bin/sh -e
> # /usr is not guaranteed to be mounted when udev starts
> 
> (
>         if grep -w "systemd" /proc/1/conn; then
>                 systemctl --non-block reload laptop-mode

Please be aware that
systemctl reload foo.service only has an affect on already running
services. So if foo.service is inactive. You'll get an error otherwise:

root@pluto:~# systemctl is-active avahi-daemon.service
inactive
root@pluto:~# systemctl reload avahi-daemon.service
Job for avahi-daemon.service invalid.
root@pluto:~# echo $?
1

Not sure if this is the behaviour you want to have.
There are other commands like reload-or-restart [1].

Michael

[1]
http://www.freedesktop.org/software/systemd/man/systemctl.html#reload-or-restart%20PATTERN...

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

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to