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

Frank Steiner fsteiner-mail1 at bio.ifi.lmu.de
Wed Nov 11 03:03:10 PST 2015


Hi,

is there an easy way to figure out if a LSB script in /etc/init.d/
is called during bootup by systemd? I need to distinguish the first
execution during boot from subsequent calls (cron, manually etc.).

It seems that /sbin/runlevel returns "unknown" during bootup, but
I'm not sure if this reliable or not.

cu,
Frank
-- 
Dipl.-Inform. Frank Steiner   Web:  http://www.bio.ifi.lmu.de/~steiner/
Lehrstuhl f. Bioinformatik    Mail: http://www.bio.ifi.lmu.de/~steiner/m/
LMU, Amalienstr. 17           Phone: +49 89 2180-4049
80333 Muenchen, Germany       Fax:   +49 89 2180-99-4049
* Rekursion kann man erst verstehen, wenn man Rekursion verstanden hat. *


More information about the systemd-devel mailing list