Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ba94497c-6d42-262b-b1f0-e3ca7d5c798c@gmail.com>
Date: Sun, 21 Jun 2020 23:39:05 +0200
From: Mikhail Morfikov <mmorfikov@...il.com>
To: lkrg-users@...ts.openwall.com
Subject: Re: The lkrg.service for systemd

On 21/06/2020 22:04, Adam Zabrocki wrote:
> Hi,
> 
> I've tested proposed Unit file and got:
> 
> [   15.469294] systemd[1]: lkrg.service: Service has Restart= setting other than no, which isn't allowed for Type=oneshot services. Refusing.
> [   15.501035] systemd[1]: lkrg.service: Cannot add dependency job, ignoring: Unit lkrg.service has a bad unit file setting.

Weird, it works just fine on:

# systemd --version
systemd 245 (245.6-1)
+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=hybrid

# systemctl status lkrg-dkms.service
● lkrg-dkms.service - Linux Kernel Runtime Guard
     Loaded: loaded (/lib/systemd/system/lkrg-dkms.service; enabled; vendor preset: enabled)
     Active: active (exited) since Sun 2020-06-21 20:40:17 CEST; 2h 48min ago
       Docs: https://bitbucket.org/Adam_pi3/lkrg-main/src/master/README
    Process: 118414 ExecStart=/sbin/modprobe -v p_lkrg (code=exited, status=0/SUCCESS)
   Main PID: 118414 (code=exited, status=0/SUCCESS)

Jun 21 20:40:17 morfikownia systemd[1]: Starting lkrg-dkms.service...
Jun 21 20:40:17 morfikownia modprobe[118414]: insmod /lib/modules/5.7.4-amd64/updates/dkms/p_lkrg.ko
Jun 21 20:40:17 morfikownia systemd[1]: Finished lkrg-dkms.service.

> 
> Originally we had:
> 
> -Type=simple
> 
> and in the new file we have:
> 
> +Type=oneshot
> 
> We can use Type=simple or edit:
> 
>> Restart=on-failure
> 
> and set it to "no".

I would remove the Restart= option altogether and let the default behavior to be
used.



Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.