Re: [Nbd] Make pre-run/post-run configurable from cmdline.
- To: Tefnet Developers <developers@...136...>
- Cc: nbd-general@lists.sourceforge.net
- Subject: Re: [Nbd] Make pre-run/post-run configurable from cmdline.
- From: Wouter Verhelst <w@...112...>
- Date: Thu, 27 Sep 2007 12:35:24 +0200
- Message-id: <20070927103524.GA31306@...39...>
- In-reply-to: <1190886672.3295.17.camel@...137...>
- References: <1190879924.3295.9.camel@...137...> <20070927085926.GB5755@...39...> <1190886672.3295.17.camel@...137...>
On Thu, Sep 27, 2007 at 11:51:12AM +0200, Tefnet Developers wrote:
> Dnia 27-09-2007, czw o godzinie 10:59 +0200, Wouter Verhelst napisał(a):
>
> > > * cmdline options -x and -X for pre-run and post-run commands
> > > (previously one could specify them only in config file);
>
> > If you have a use case where it's valid to use the command line but not
> > the config file, I *might* be prompted to change that belief, but you
> > would have to make a very strong case.
> >
>
> Well, I need that because I run nbd-server from another program, which
> defines nbd-server's behaviour by altering command line.
That's an... interesting way to use nbd-server. What type of stuff does
your "other program" want to do? Can you go into a bit more detail here?
> It's much simpler and elegant for me to generate a cmdline string than
> write a temporary config file.
I see.
I can think of a few alternatives to that approach; but lacking detail,
I can't really know whether they're feasible.
The first would be to add a commandline option to select one particular
configuration block in the config file, and to serve only that. If you
have a limited number of different configurations, then this could make
sense.
The second would be to use nbd-server in inetd mode (use "0" as the port
to accomplish that), and to use a wrapper script that sets up what you
want to set up.
--
<Lo-lan-do> Home is where you have to wash the dishes.
-- #debian-devel, Freenode, 2004-09-22
Reply to: