DevHeads.net

systemd

Hi All - I have a systemd service file to start my application.

Part of my service file is:
[Service]
Type=forking
ExecStart=/path to start
ExecStop=/path to stop
RemainAfterExit=yes

This works fine "normally".

However - when I do a "yum update; and reboot" my script detects a kernel
change and now does a number of "recompiling" steps for drivers and such
before starting my application. Somewhere along the way that just stops.
I'm half way into recompiling those drivers and it just stops.

Is there something else I need in the service file ?

Thanks

Jerry

Comments

Re: systemd

By Lange, Markus at 02/08/2019 - 03:55

Hi,

for compiling Kernel Modules it might be worth looking at DKMS.
DKMS is available through EPEL and is designed to compile Kernel
Modules in an automated way when ever Kernel Updates are made.

For more Informations on DKMS see [1, 2, 3].

best regards,
Markus

[1] <a href="https://github.com/dell/dkms" title="https://github.com/dell/dkms">https://github.com/dell/dkms</a>
[2] <a href="https://linux.die.net/man/8/dkms" title="https://linux.die.net/man/8/dkms">https://linux.die.net/man/8/dkms</a>
[3] <a href="https://wiki.archlinux.org/index.php/Dynamic_Kernel_Module_Support" title="https://wiki.archlinux.org/index.php/Dynamic_Kernel_Module_Support">https://wiki.archlinux.org/index.php/Dynamic_Kernel_Module_Support</a>

On Thu, 2019-02-07 at 09:40 -0500, Jerry Geis wrote:

Re: systemd

By James Pearson at 02/07/2019 - 17:24

Jerry Geis wrote:
Could it be you are hitting some default timeout ?

Maybe adding 'TimeoutSec=infinity' could help ?

Or, maybe moving your 'recompiling' stage to an ExecStartPre script ?

(no idea if either of the above will help)

James Pearson