aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMenno Duursma <druiloor@zonnet.nl>2010-05-11 15:01:38 +0200
committerMichiel van Wessem <michiel@slackbuilds.org>2010-05-11 15:01:38 +0200
commit510be39fd321d9fb0532b499b3cdf23dbe742623 (patch)
tree69956883f252471411d0da4744a9c04c324cc0be
parent747e62b37ba05521cfe1042fc2d517bdbc2e9e8c (diff)
network/unfs3: Initial import
-rw-r--r--network/unfs3/README20
-rw-r--r--network/unfs3/doinst.sh16
-rw-r--r--network/unfs3/rc.unfsd66
-rw-r--r--network/unfs3/slack-desc11
-rw-r--r--network/unfs3/unfs3.SlackBuild70
-rw-r--r--network/unfs3/unfs3.info8
6 files changed, 191 insertions, 0 deletions
diff --git a/network/unfs3/README b/network/unfs3/README
new file mode 100644
index 0000000000000..3a18555f83ecd
--- /dev/null
+++ b/network/unfs3/README
@@ -0,0 +1,20 @@
+UNFS3 is a user-space implementation of the NFSv3 server specification.
+It provides a daemon for the MOUNT and NFS protocols, which are used by
+NFS clients for accessing files on the server.
+
+It can be configured to run under an unprivileged user account, can password
+protect its exports (even with one-time passwords), and supports ClusterNFS'
+file tagging features.
+
+unfsd conflicts with knfsd (the kernel-mode NFS server) if both are configured
+to listen to the same port, which defaults to 2049.
+
+Slackware Linux 11.0 ships with knfsd, however that defaults to disabled.
+To use this NFS server instead, make sure /etc/rc.d/rc.unfsd is executable and
+/etc/rc.d/rc.nfsd is not executable. Add the following to /etc/rc.d/rc.local:
+
+# Start the NFSv3 service
+if [ -x /etc/rc/d/rc.unfsd ]; then
+ /etc/rc/d/rc.unfsd start
+fi
+
diff --git a/network/unfs3/doinst.sh b/network/unfs3/doinst.sh
new file mode 100644
index 0000000000000..e61b40abaa3d7
--- /dev/null
+++ b/network/unfs3/doinst.sh
@@ -0,0 +1,16 @@
+config() {
+ NEW="$1"
+ OLD="`dirname $NEW`/`basename $NEW .new`"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+# Add this package's version of boot-script, if only for documentation
+config etc/rc.d/rc.unfsd.new
+
diff --git a/network/unfs3/rc.unfsd b/network/unfs3/rc.unfsd
new file mode 100644
index 0000000000000..e78b81a91e4ef
--- /dev/null
+++ b/network/unfs3/rc.unfsd
@@ -0,0 +1,66 @@
+#!/bin/sh
+# Start/stop/restart the UNFS server.
+#
+# This is an init script for the User-mode NFS daemon.
+#
+# To use NFS, you must first set up /etc/exports.
+# See unfsd(8) for information on /etc/exports format.
+#
+# Written for Slackware Linux' knfsd by Patrick J. Volkerding <volkerdi@slackware.com>.
+# Modified to use unfsd by Menno E. Duursma <druiloor@zonnet.nl>
+
+unfsd_start() {
+ # Sanity checks. Exit if there's no /etc/exports, or if there aren't any
+ # shares defined in it.
+ if [ ! -r /etc/exports ]; then # no config file, exit:
+ exit
+ elif ! grep -v -e '^#' -e '^$' /etc/exports | grep -q '/' ; then
+ exit # no uncommented shares in /etc/exports
+ fi
+
+ echo -n "Starting UNFS server daemon(s):"
+
+ if [ -x /sbin/rpc.portmap ]; then
+ if ! ps axc | grep -q rpc.portmap ; then
+ echo -n " /sbin/rpc.portmap"
+ /sbin/rpc.portmap
+ fi
+
+ if [ -x /usr/sbin/unfsd ]; then
+ echo " /usr/sbin/nfsd"
+ /usr/sbin/unfsd
+ fi
+ else
+ echo "WARNING: Cannot start RPC portmapper daemon needed for UNFS."
+ echo " /sbin/rpc.portmap (a required daemon) is not executable"
+ echo " or is not present on your system."
+ echo
+ fi
+}
+
+unfsd_stop() {
+ echo "Stopping UNFS server daemon..."
+ killall unfsd 2> /dev/null
+ sleep 1
+ killall -9 unfsd 2> /dev/null # make sure :)
+}
+
+unfsd_restart() {
+ unfsd_stop
+ sleep 1
+ unfsd_start
+}
+
+case "$1" in
+'start')
+ unfsd_start
+ ;;
+'stop')
+ unfsd_stop
+ ;;
+'restart')
+ unfsd_restart
+ ;;
+*)
+ echo "usage $0 start|stop|restart"
+esac
diff --git a/network/unfs3/slack-desc b/network/unfs3/slack-desc
new file mode 100644
index 0000000000000..4118be518a9b9
--- /dev/null
+++ b/network/unfs3/slack-desc
@@ -0,0 +1,11 @@
+unfs3: UNFS3 (unfsd) user-space NFSv3 server
+unfs3:
+unfs3: An implementation of the NFS (Network File System)
+unfs3: version 3 server specification. It provides a daemon that
+unfs3: supports both the MOUNT and NFS protocol.
+unfs3:
+unfs3: This version was compiled with optional support for
+unfs3: cluster client file tags.
+unfs3:
+unfs3: UNFS3 is maintained by: Pascal Schmidt
+unfs3:
diff --git a/network/unfs3/unfs3.SlackBuild b/network/unfs3/unfs3.SlackBuild
new file mode 100644
index 0000000000000..82a2bd8a9a0bb
--- /dev/null
+++ b/network/unfs3/unfs3.SlackBuild
@@ -0,0 +1,70 @@
+#!/bin/sh
+
+# Slackware build script for UNFS3 (unfsd)
+# Written by Menno E. Duursma <druiloor@zonnet.nl>
+
+# Modified by the SlackBuilds.org project
+
+set -e
+
+PRGNAM=unfs3
+VERSION=0.9.17
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+chmod -R u+w,go+r-w,a-s .
+
+# Note: the support for cluster tags compiled-in below can be
+# enabled by way of a startup argument to unfsd.
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --enable-cluster
+
+make
+make install-strip DESTDIR=$PKG
+
+( cd $PKG/usr/man
+ find . -type f -exec gzip -9 {} \;
+ for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+)
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a [A-Z][A-Z]* doc/* contrib $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/etc/rc.d
+cat $CWD/rc.unfsd >$PKG/etc/rc.d/rc.unfsd.new
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh >$PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
+
+# Clean up the extra stuff
+if [ "$1" = "--cleanup" ]; then
+ rm -rf $TMP/$PRGNAM-$VERSION
+ rm -rf $PKG
+fi
+
diff --git a/network/unfs3/unfs3.info b/network/unfs3/unfs3.info
new file mode 100644
index 0000000000000..1ca4dcb46157e
--- /dev/null
+++ b/network/unfs3/unfs3.info
@@ -0,0 +1,8 @@
+PRGNAM="unfs3"
+VERSION="0.9.17"
+HOMEPAGE="http://unfs3.sourceforge.net/"
+DOWNLOAD="http://mesh.dl.sourceforge.net/sourceforge/unfs3/unfs3-0.9.17.tar.gz"
+MD5SUM="cde90d604ef42d8ab0c82ed501179417"
+MAINTAINER="Menno Duursma"
+EMAIL="druiloor@zonnet.nl"
+APPROVED="BP{k},robw810"