[Nbd] running commands before and after connecting
- To: nbd-general@lists.sourceforge.net
- Subject: [Nbd] running commands before and after connecting
- From: Wouter Verhelst <w@...112...>
- Date: Thu, 26 Jul 2007 12:21:54 +0200
- Message-id: <20070726102154.GA18132@...39...>
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: