On 28.10.2012 19:14, Ritesh Raj Sarraf wrote: > Hello Michael, > > On Sunday 28 October 2012 11:28 PM, Michael Biebl wrote: >> Is the forking/polling process the main process that stays around? >> Do you have more then one long running process? >> For a Type=forking service systemd tries to get the MainPID so it can >> properly monitor the service and detect crashes. >> Usually you supply a PIDFile option, telling systemd the PID of the main >> process for Type=forking services. >> > > LMT is not a daemon. It is a script which runs and then exits. Earlier, > it used to be invoked through acpid (and also through pm-utils during > swsusp resume) events, but lately, if prefer udev much more. > > The only exception is the lm-polling-daemon script, which gets invoked > (and backgrounded), if LMT senses that the machine is on battery. THis > is done to check the machine state every 120 secs. > > The initscript option was given for a manual invocation by the user. Of > course, the user could have also invoked the script directly. Providing > it as a init script also portrayed it as a service. > > > What I am looking with LMT + systemd support, is a plain an simple > service which runs at boot and then just exits.
I don't understand what this service is supposed to do. Above you said, that when on battery it will spawn a long running process. Now you said it's simply starts end exits? Further invocation will > simply be handled by events daemons like udev/acpid. > > > Do you think Type=forking would be a fit here? I think to answer that properly, I'd need to better understand what all those scripts are supposed to do. To me it seems you want a single daemon, that listens on udev and acpi events via netlink, and then dispatches/runs commands on certain events/conditions. -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?
signature.asc
Description: OpenPGP digital signature