Received: from eggs.gnu.org ([2001:4830:134:3::10]:51425) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlIqs-0005Sc-Pp for qemu-devel@nongnu.org; Mon, 03 Nov 2014 09:43:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XlIqn-0002wM-Oe for qemu-devel@nongnu.org; Mon, 03 Nov 2014 09:43:26 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43148) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlIqn-0002wC-I4 for qemu-devel@nongnu.org; Mon, 03 Nov 2014 09:43:21 -0500 From: Markus Armbruster References: <1414942012-5242-1-git-send-email-chaoseternal@gmail.com> Date: Mon, 03 Nov 2014 15:43:17 +0100 In-Reply-To: <1414942012-5242-1-git-send-email-chaoseternal@gmail.com> (Jun Sheng's message of "Sun, 2 Nov 2014 23:26:52 +0800") Message-ID: <87k33cuyyi.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH][v2] inetd enabled qemu-nbd List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jun Sheng Cc: Paolo Bonzini , qemu-devel@nongnu.org Copying the maintainer. Please do that yourself in future patch submissions. You can list maintainers with "scripts/get_maintainer.pl --no-git-fallback *.patch". Jun Sheng writes: > run qemu-nbd as an inetd service has some benefits > * more scriptable, such as serve multiple images to different clients > on one ip/port > * access control using tcpd > > simple usage: > #!/bin/sh > # qemu-nbd wrapper, select image file according to client ip address > IMG_FILE=`sed -n "s/$REMOTE_HOST //p" /path/to/image_list.txt` > qemu-nbd -i 10 $IMG_FILE 10<&0- 1>/tmp/log 2>/tmp/log2 > > #end > > #xinetd.conf > service nbd > { > flags = REUSE > socket_type = stream > wait = no > user = some_user > server = /path/to/qemu-nbd-wrapper.sh > log_on_failure += USERID > disable = no > } > > Signed-off-by: Jun Sheng