Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Dec 2008 02:54:57 +0200
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        KES <kes-kes@yandex.ru>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Startup scipt
Message-ID:  <87bpvdaqhq.fsf@kobe.laptop>
In-Reply-To: <569944077.20081215235643@yandex.ru> (KES's message of "Mon, 15 Dec 2008 23:56:43 %2B0200")
References:  <569944077.20081215235643@yandex.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 15 Dec 2008 23:56:43 +0200, KES <kes-kes@yandex.ru> wrote:
> It there feature (option in rc.subr) to run multiple services at once?

None that I know of.

> For example I have 'service'
> to run service with specific flags I want to do:
>
> service_enable="YES"
> service_instances="instance1 instance2"
> service_instance1_flags="-flag 1 rl0"
> service_instance2_flags="-flag 2 rl2"
>
> so rc.subr will run:
> service -flag 1 rl0
> service -flag 2 rl2

It may be possible to simulate what /etc/rc.d/moused does.  In recent
versions of the script, the following commands are supported:

    /etc/rc.d/moused start

    /etc/rc.d/moused start ums0

The first invocation uses the 'default' options from `rc.conf':

    moused_enable
    moused_port
    moused_type
    moused_flags

The second invocation uses another set of options from `rc.conf':

    moused_ums0_enable
    moused_ums0_port
    moused_ums0_type
    moused_ums0_flags

The support for these non-default options is implemented using a small
local hack in `src/etc/rc.d/moused':

    http://svn.freebsd.org/viewvc/base/head/etc/rc.d/moused?view=annotate#l24

It would be great if you found some way to integrate this with the rest
of rc.d.  This way more scripts can support multiple instances of the
underlying service :)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?87bpvdaqhq.fsf>