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

[Nbd] running commands before and after connecting



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 

The idea would be to have something like this in the config file:

[generic]
[export]
	exportname = /export/%s
	port = 1234
	virtstyle = cidrhash 24
	prerun = dd if=/dev/zero of=%s bs=1k seek=1k count=1
	postrun = rm -f %s

The '%s' in the prerun and postrun will be replaced by the file name
which nbd-server expects to see. This would probably only work if the
multi-file option is not enabled.

Thoughts?

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



Reply to: