[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Nbd] Make pre-run/post-run configurable from cmdline.

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

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: