Mailinglist Archive: opensuse (1690 mails)

< Previous Next >
Re: [opensuse] startproc in rc scripts
  • From: Per Jessen <per@xxxxxxxxxxxx>
  • Date: Tue, 08 Nov 2011 08:31:32 +0100
  • Message-id: <j9alsj$fl6$2@saturn.local.net>
Roger Oberholtzer wrote:

On Fri, 2011-11-04 at 16:34 +0100, Per Jessen wrote:
Roger Oberholtzer wrote:

On Fri, 2011-11-04 at 00:22 +1030, Rodney Baker wrote:

I'd suggest you many need multiple entries in /etc/rc.d/init.d
(e.g. 51- <process>.rc, 52-<process>.rc...n-<process>.rc). I'd see
the flow something like:

I perhaps could have lived with that. But it 'seems' it is not the
rc script name that is behind this. It is the binary that you run.
In my case I am running /sbin/vblade. The second call to startproc
senses that /sbin/vblade is already running and does nothing. If I
make a copy of the binary called /sbin/vblade2, then I can start
another.

hi Roger

this is a poor workaround:

create a tiny script, e.g. /sbin/runvblade:

-----
#!/bin/sh
exec /sbin/vblade
--------

You should be able to run "startproc -s /sbin/runvblade" as many
times as you want.

Curious. Why would this work? I will of course try it. But I would
like to know what is different between running a script and the
program direct.

It works because the name of executable changes when the script
does 'exec'.

Will it 'status' and 'stop' commands to the rc script
also work?

Depends on the script :-) If it uses killproc, it probably won't do
what you expect, no. Basically, startproc/killproc were meant to
manage single instances, not multiple.


--
Per Jessen, Zürich (9.2°C)

--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups