summaryrefslogtreecommitdiff
path: root/network
diff options
context:
space:
mode:
Diffstat (limited to 'network')
-rw-r--r--network/unfs3/README25
-rw-r--r--network/unfs3/doinst.sh12
-rw-r--r--network/unfs3/rc.unfsd66
-rw-r--r--network/unfs3/unfs3.SlackBuild31
-rw-r--r--network/unfs3/unfs3.info10
5 files changed, 49 insertions, 95 deletions
diff --git a/network/unfs3/README b/network/unfs3/README
index 943c51238d..c60c0663ca 100644
--- a/network/unfs3/README
+++ b/network/unfs3/README
@@ -2,18 +2,17 @@ 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.
+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.
+unfsd conflicts with knfsd (the kernel-mode NFS server) if both are
+to listen on 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
+Slackware Linux ships with knfsd. To use this NFS server instead,
+make sure /etc/rc.d/rc.unfsd is executable and /etc/rc.d/rc.nfsd is not.
+For auto-start at machine boot 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
index e61b40abaa..302df95e70 100644
--- a/network/unfs3/doinst.sh
+++ b/network/unfs3/doinst.sh
@@ -1,16 +1,22 @@
config() {
NEW="$1"
- OLD="`dirname $NEW`/`basename $NEW .new`"
+ 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
+ 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
+# Keep same perms on rc.unfsd.new:
+if [ -e etc/rc.d/rc.unfsd ]; then
+ cp -a etc/rc.d/rc.unfsd etc/rc.d/rc.unfsd.new.incoming
+ cat etc/rc.d/rc.unfsd.new > etc/rc.d/rc.unfsd.new.incoming
+ mv etc/rc.d/rc.unfsd.new.incoming etc/rc.d/rc.unfsd.new
+fi
+
config etc/rc.d/rc.unfsd.new
diff --git a/network/unfs3/rc.unfsd b/network/unfs3/rc.unfsd
deleted file mode 100644
index e78b81a91e..0000000000
--- a/network/unfs3/rc.unfsd
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/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/unfs3.SlackBuild b/network/unfs3/unfs3.SlackBuild
index 1589c8085c..8e19ad07b9 100644
--- a/network/unfs3/unfs3.SlackBuild
+++ b/network/unfs3/unfs3.SlackBuild
@@ -5,13 +5,16 @@
# Modified by the SlackBuilds.org project
-set -e
+# This program is free software. It comes without any warranty.
+# Granted WTFPL, Version 2, as published by Sam Hocevar. See
+# http://sam.zoy.org/wtfpl/COPYING for more details.
PRGNAM=unfs3
-VERSION=0.9.17
+VERSION=0.9.21
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
@@ -21,13 +24,17 @@ if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
fi
+set -e # Exit on most errors
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
@@ -38,12 +45,22 @@ CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
- --enable-cluster
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --enable-cluster \
+ --disable-static \
+ --build=$ARCH-slackware-linux
make
make install-strip DESTDIR=$PKG
-( cd $PKG/usr/man
+# Add the init script
+install -D -m 0755 unfsd.init $PKG/etc/rc.d/rc.unfsd.new
+
+# Precreate lock directory, as the init script expects that to exist
+mkdir -p $PKG/var/lock/subsys
+
+( cd $PKG/usr/man || exit 1
find . -type f -exec gzip -9 {} \;
for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
)
@@ -51,9 +68,7 @@ make install-strip DESTDIR=$PKG
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
+cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README$TAG
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
diff --git a/network/unfs3/unfs3.info b/network/unfs3/unfs3.info
index ece105dfd4..35f62a0d0e 100644
--- a/network/unfs3/unfs3.info
+++ b/network/unfs3/unfs3.info
@@ -1,8 +1,8 @@
PRGNAM="unfs3"
-VERSION="0.9.17"
+VERSION="0.9.21"
HOMEPAGE="http://unfs3.sourceforge.net/"
-DOWNLOAD="http://mesh.dl.sourceforge.net/sourceforge/unfs3/unfs3-0.9.17.tar.gz"
-MD5SUM="cde90d604ef42d8ab0c82ed501179417"
-MAINTAINER="Menno Duursma"
+DOWNLOAD="http://downloads.sourceforge.net/unfs3/unfs3-0.9.21.tar.gz"
+MD5SUM="fbd1c82bf8048c1d5289158fe11a9ab4"
+MAINTAINER="Menno E. Duursma"
EMAIL="druiloor@zonnet.nl"
-APPROVED="BP{k},rworkman"
+APPROVED="rworkman"