[systemd-devel] Detect if a script runs during bootup

Reindl Harald h.reindl at thelounge.net
Wed Nov 11 07:47:59 PST 2015



Am 11.11.2015 um 16:39 schrieb Frank Steiner:
> Tomasz Torcz wrote
>
>> I would suggest splitting the "on boot only" part into separate
>> unit, with RemainAfterExit=true.  The main part should require boot-only
>> part.
>> First of all, create a proper unit and drop LSB script.
>
> This is not possible as it is an opensuse system script that I cannot
> replace.

says who?

thats why /etc/systemd/system/ exists - override sysvinit scripts and 
even systemd-units from packages - just name it identical and it will win

[root at srv-rhsoft:~]$ ls /etc/rc.d/init.d/vmware

-rwxr-xr-x 1 root root 14K 2015-11-01 21:01 /etc/rc.d/init.d/vmware
[root at srv-rhsoft:~]$ systemctl status vmware
● vmware.service - VMware Workstation Service
    Loaded: loaded (/etc/systemd/system/vmware.service; enabled; vendor 
preset: disabled)
    Active: active (exited) since Mi 2015-11-11 10:32:47 CET; 6h ago
  Main PID: 985 (code=exited, status=0/SUCCESS)
    CGroup: /system.slice/vmware.service

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20151111/dad248fa/attachment.sig>


More information about the systemd-devel mailing list