Re: Q: systemd is restarting demons?

2017-07-20 Thread Lck Ras
On 07/20/2017 07:23 PM, Hans wrote:
> Hello, 
> 
> I am wondering, if it is normal, that systemd is restarting a service, which 
> I as root did 
> stop. In may case it is laptools-mode. 
> 
> See the output of syslog:
> Jul 20 12:16:47 localhost laptop-mode: enabled, not active 

laptop-mode-tools installs udev rules at
/lib/udev/rules.d/99-laptop-mode.rules that restarts lmt when you
plug/unplug your laptop or a usb device. It's how it determines whether
to enable or disable laptop-mode when the power supply changes or set
autosuspend on usb devices.

lmt also runs the script /lib/udev/lmt-udev every 150 seconds through
the systemd timer /lib/systemd/system/laptop-mode.timer to detect
battery changes. This script reloads/restarts the systemd service. You
may stop this timer, but lmt will still be restarted when you plug in
your laptop or a usb device.

Stopping laptop-mode.service and masking it through 'systemctl mask
laptop-mode.service' might stop lmt, but I'm not 100% sure, and I
haven't tested it. If it does work, you would need to unmask it
(systemctl unmask ...) in order to be able to enable it again.



Re: Q: systemd is restarting demons?

2017-07-20 Thread Nicolas George
Le duodi 2 thermidor, an CCXXV, Hans a écrit :
> Jul 20 12:16:47 localhost laptop-mode: enabled, not active 

Unless I am mistaken, that means the service is not currently running,
but set up to start automatically at boot (or more specifically for the
target blah blah).

It is exactly the same as "/etc/init.d/foobar stop" versus "rm
/etc/rc?.d/???foobar", nothing special about systemd.

Regards,

-- 
  Nicolas George


signature.asc
Description: Digital signature


Re: Q: systemd is restarting demons?

2017-07-20 Thread Dominik George
Hi,

>I am wondering, if it is normal, that systemd is restarting a service,
>which I as root did 
>stop. In may case it is laptools-mode. 
>
>See the output of syslog:
>Jul 20 12:16:47 localhost laptop-mode: enabled, not active 
>
>
>I know, I can force systemd, not to start demons at boot, but this
>behaviour is looking 
>strange. Strange philosophy, I mean.
>
>Maybe it is a bug?

Most likely not.

Like you said, you stopped it, but you didn't disable it.

There are many reasons why systemd might start a service:

 * connection on a socket
 * user session start
 * a timer
 * an ACPI event

In your case, it seems like it was a user session starting up.

-nik



Q: systemd is restarting demons?

2017-07-20 Thread Hans
Hello, 

I am wondering, if it is normal, that systemd is restarting a service, which I 
as root did 
stop. In may case it is laptools-mode. 

See the output of syslog:
Jul 20 12:16:47 localhost laptop-mode: enabled, not active 


I know, I can force systemd, not to start demons at boot, but this behaviour is 
looking 
strange. Strange philosophy, I mean.

Maybe it is a bug?

Best regards

Hans