diff -Nurp /var/abs/community/nbd//config .//config --- /var/abs/community/nbd//config 1970-01-01 01:00:00.000000000 +0100 +++ .//config 2011-05-28 23:16:55.887187200 +0200 @@ -0,0 +1,30 @@ +# This is a comment +[generic] + # The [generic] section is required, even if nothing is specified + # there. + # When either of these options are specified, nbd-server drops + # privileges to the given user and group after opening ports, but + # _before_ opening files. + user = nbd + group = nbd + oldstyle = true +[export1] + exportname = /export/nbd/export1-file + port = 12345 + authfile = /export/nbd/export1-authfile + timeout = 30 + filesize = 10000000 + readonly = false + multifile = false + copyonwrite = false + prerun = dd if=/dev/zero of=%s bs=1k count=500 + postrun = rm -f %s +[otherexport] + exportname = /export/nbd/experiment + port = 12346 + # The other options are all optional. +[archiso] + exportname = /path/archlinux-netinstall-dual.iso + port = 9040 + timeout = 3600 + readonly = true diff -Nurp /var/abs/community/nbd//nbd .//nbd --- /var/abs/community/nbd//nbd 2011-05-28 06:11:31.000000000 +0200 +++ .//nbd 2011-05-28 23:10:35.020637531 +0200 @@ -2,15 +2,14 @@ . /etc/rc.conf . /etc/rc.d/functions -. /etc/conf.d/nbd -PIDFILE="/var/run/nbd-server.$NBD_PORT.pid" +PIDFILE="/var/run/nbd-server.pid" PID=`cat $PIDFILE 2>/dev/null` case "$1" in start) stat_busy "Starting Network Block Device Server" if [ "$PID" = "" ]; then - /usr/bin/nbd-server $NBD_PORT $NBD_DEV $NBD_ARGS + /usr/bin/nbd-server fi if [ "$PID" != "" -o $? -gt 0 ]; then stat_fail diff -Nurp /var/abs/community/nbd//nbd.conf.d .//nbd.conf.d --- /var/abs/community/nbd//nbd.conf.d 2011-05-28 06:11:31.000000000 +0200 +++ .//nbd.conf.d 1970-01-01 01:00:00.000000000 +0100 @@ -1,8 +0,0 @@ -# -# Configuration for network block device (nbd) daemon -# - -NBD_PORT=2000 -NBD_DEV="/srv/http/sysrcd.dat" -NBD_ARGS="-r" - diff -Nurp /var/abs/community/nbd//PKGBUILD .//PKGBUILD --- /var/abs/community/nbd//PKGBUILD 2011-05-28 06:11:31.000000000 +0200 +++ .//PKGBUILD 2011-05-28 23:17:22.616711142 +0200 @@ -1,27 +1,30 @@ # $Id: PKGBUILD 48022 2011-05-27 15:14:57Z svenstaro $ # Maintainer: Sven-Hendrik Haase -# Contributor : Ionut Biru +# Contributor: Christian Hesse +# Contributor: Ionut Biru # Contributor: Gerhard Brauer + pkgname=nbd pkgver=2.9.21a -pkgrel=1 +pkgrel=2 pkgdesc="Tools for network block devices, allowing you to use remote block devices over TCP/IP." arch=('i686' 'x86_64') url="http://nbd.sourceforge.net" license=('GPL') source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2 - nbd.conf.d nbd) + config nbd) +backup=('etc/nbd-server/config') depends=('glib2') md5sums=('4028c77d52a13f16be5e9bf3d3bab27d' - '6d746f377a28b92dd2c80f01176cb811' - 'ab9c431881f5e3c98a8f6c04016f0e00') + '76dc8063d5157da7860f735eec3a1baa' + 'e7b13a8b3369e11927d9917664557efa') build(){ cd "${srcdir}/${pkgname}-${pkgver}" - ./configure --prefix=/usr + ./configure --prefix=/usr --sysconfdir=/etc make make DESTDIR="${pkgdir}" install - install -D -m644 "${srcdir}"/nbd.conf.d "${pkgdir}"/etc/conf.d/nbd + install -D -m644 "${srcdir}"/config "${pkgdir}"/etc/nbd-server/config install -D -m755 "${srcdir}"/nbd "${pkgdir}"/etc/rc.d/nbd }