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

Re: [Nbd] running commands before and after connecting

On Thu, Jul 26, 2007 at 09:07:20AM -0500, Scott Balneaves wrote:
> Wouter Verhelst wrote:
> > Hi,
> > 
> > I'm currently thinking about implementing an option for the config file
> > to allow one to run a script after a client connects (but before the
> > server starts serving or tries to open any files), and the same for
> > after a client disconnects. The point of this feature would be 
> Hi Wouter!
> Heh, this was EXACTLY the reason why we wanted the inetd support in
> nbd, as this was what we were using it for.  On the ltsp project, here,
> for instance, is our nbdswapd, started from inetd:

I know; I actually looked at that code before coming up with the above ;)

(side note, the proposal has already been implemented by now, though it
still need some testing).

> So, we were handling what you were proposing, but by a slightly different
> method.  Yours is just as good as ours, and I, personally, would be fine
> with either.
> If, however, I might make a suggestion, that at least from a packaging
> point of view, would make things easier?
> Instead of having a monolithic nbd.conf file, I'm a huge fan of the
> config dir model, with each service getting it's own file.  That way,
> packaging wise, we're not having to mess with anyone else's config,
> but rather, can just drop our own config file in.

Hmm, yeah, that could make sense. Let's see.

We could have something like

	include = /etc/nbd-server/config.d/*.conf

With files in that directory then being allowed to contain export
sections, but no generic section.

> I'm up to my butt in alligators right at the moment with the next
> Edubuntu release, but if you're interested, I'd be more than happy
> to code that up for you, and send a patch, in the September to October
> timeframe.

Theoretically I should be able to write this myself, but you're welcome
to beat me to it if I don't find the time :-)

<Lo-lan-do> Home is where you have to wash the dishes.
  -- #debian-devel, Freenode, 2004-09-22

Reply to: