nbd.paketlendi

This commit is contained in:
milisarge 2017-03-31 23:00:23 +03:00
parent 8de35ea0f2
commit e735f83cb7
3 changed files with 59 additions and 0 deletions

View File

@ -0,0 +1,7 @@
# nbd-server access configuration file
# list of hosts allowed to connect to our exportet
#
#127.0.0.1
# CIDR notation is allowed also
#192.168.0.0/8

View File

@ -0,0 +1,28 @@
#!/bin/sh
#
# /etc/rc.d/init.d/nbd-server: start/stop nbd daemon
#
case $1 in
start)
/usr/bin/nbd-server -p /var/run/nbd-server.pid -l /etc/nbd-server/allow
;;
stop)
if [ -f /var/run/nbd-server.pid ]; then
kill `cat /var/run/nbd-server.pid`
rm -f /var/run/nbd-server.pid
else
killall -q /usr/sbin/nbd-server
fi
;;
restart)
$0 stop
sleep 2
$0 start
;;
*)
echo "kullanim: $0 [start|stop|restart]"
;;
esac
# End of file

View File

@ -0,0 +1,24 @@
# Description: Blok cihazlarının NBD protokolüyle paylaşma ve kullanma
# URL: http://nbd.sourceforge.net/
# Maintainer: milisarge
# Depends on: gnutls glib
name=nbd
version=3.15.2
release=1
source=(http://downloads.sourceforge.net/project/nbd/nbd/$version/$name-$version.tar.xz
nbd-server
allow)
build() {
cd $name-$version
./configure --prefix=/usr \
--mandir=/usr/man \
--sysconfdir=/etc
make
make DESTDIR=$PKG install
install -d $PKG/etc/nbd-server
install -D -m 600 $SRC/allow $PKG/etc/nbd-server/allow
install -D -m 755 $SRC/nbd-server $PKG/etc/rc.d/init.d/nbd-server
}