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

2015-11-23 Thread Frank Steiner
Colin Guthrie wrote > Zbigniew Jędrzejewski-Szmek wrote on 11/11/15 15:55: >> On Wed, Nov 11, 2015 at 04:39:23PM +0100, Frank Steiner wrote: >>> Isn't there an easy way to figure out if this script is running >>> inside the boot process? Some variable set or not yet set? >> You can use systemctl

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

2015-11-12 Thread Frank Steiner
Reindl Harald wrote >> 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 Right, but it's the

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

2015-11-12 Thread Colin Guthrie
Zbigniew Jędrzejewski-Szmek wrote on 11/11/15 15:55: > On Wed, Nov 11, 2015 at 04:39:23PM +0100, Frank Steiner wrote: >> Isn't there an easy way to figure out if this script is running >> inside the boot process? Some variable set or not yet set? > You can use systemctl is-system-running (see the

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

2015-11-12 Thread Frederic Crozat
Le jeudi 12 novembre 2015 à 11:31 +0100, Frank Steiner a écrit : > Reindl Harald wrote > > > > 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-devel] Detect if a script runs during bootup

2015-11-11 Thread Frank Steiner
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

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

2015-11-11 Thread Tomasz Torcz
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

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

2015-11-11 Thread Zbigniew Jędrzejewski-Szmek
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

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

2015-11-11 Thread 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

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

2015-11-11 Thread Zbigniew Jędrzejewski-Szmek
On Wed, Nov 11, 2015 at 04:39:23PM +0100, Frank Steiner wrote: > Isn't there an easy way to figure out if this script is running > inside the boot process? Some variable set or not yet set? You can use systemctl is-system-running (see the man page). Zbyszek

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

2015-11-11 Thread Jóhann B . Guðmundsson
On 11/11/2015 03:39 PM, Frank Steiner wrote: If I was able to work with systemd unit files, I could perfectly do what I want, but I'm stuck with this LSB file. Why are you stuck with that lsb file and what exactly does it do? ( Paste the content of it ) JBG

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

2015-11-11 Thread Reindl Harald
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