On Wed, Nov 11, 2015 at 12:17:59PM +0100, Tomasz Torcz wrote: > On Wed, Nov 11, 2015 at 12:03:10PM +0100, Frank Steiner wrote: > > 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. > > 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. +1.
There's no distinction between "boot" and "subsequnct calls": what if boot takes a bit longer and cron calls the script during boot? Zbyszek _______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
