diff --git a/templates/nfs-utils/files/mountd b/templates/nfs-utils/files/mountd new file mode 100755 index 00000000000..b7e8064e1a2 --- /dev/null +++ b/templates/nfs-utils/files/mountd @@ -0,0 +1,19 @@ +#!/bin/sh +# +# PROVIDE: mountd +# REQUIRE: portmap nfslock + +$_rc_subr_loaded . /etc/rc.subr + +name="mountd" +rcvar=$name +command="/usr/sbin/rpc.mountd" +start_precmd="mountd_precmd" + +mountd_precmd() +{ + /usr/sbin/exportfs -r +} + +load_rc_config $name +run_rc_command "$1" diff --git a/templates/nfs-utils/files/nfsd b/templates/nfs-utils/files/nfsd new file mode 100755 index 00000000000..60acef34ae9 --- /dev/null +++ b/templates/nfs-utils/files/nfsd @@ -0,0 +1,19 @@ +#!/bin/sh +# +# PROVIDE: nfsd +# REQUIRE: mountd + +$_rc_subr_loaded . /etc/rc.subr + +name="nfsd" +rcvar=$name +command="/usr/sbin/rpc.nfsd" +start_postcmd="nfsd_postcmd" + +nfsd_postcmd() +{ + /usr/sbin/sm-notify ${smnotify_args} +} + +load_rc_config $name +run_rc_command "$1" diff --git a/templates/nfs-utils/files/nfslock b/templates/nfs-utils/files/nfslock new file mode 100755 index 00000000000..e940444d4df --- /dev/null +++ b/templates/nfs-utils/files/nfslock @@ -0,0 +1,24 @@ +#!/bin/sh +# +# PROVIDE: nfslock +# REQUIRE: portmap + +$_rc_subr_loaded . /etc/rc.subr + +name="nfslock" +rcvar=$name +command="/usr/sbin/rpc.statd" +start_precmd="statd_precmd" + +statd_precmd() +{ + # Check for /proc/fs/nfsd + if grep -qs nfsd /proc/filesystems ; then + if ! grep -qs "nfsd /proc/fs/nfsd" /proc/mounts ; then + mount -t nfsd -o nodev,noexec,nosuid nfsd /proc/fs/nfsd + fi + fi +} + +load_rc_config $name +run_rc_command "$1" diff --git a/templates/nfs-utils/template b/templates/nfs-utils/template new file mode 100644 index 00000000000..ccdd8f702b9 --- /dev/null +++ b/templates/nfs-utils/template @@ -0,0 +1,30 @@ +# Template file for 'nfs-utils' +pkgname=nfs-utils +version=1.1.5 +distfiles="http://downloads.sf.net/nfs/$pkgname-$version.tar.bz2" +build_style=gnu_configure +configure_args="--with-statduser=nobody --disable-gss --disable-nfsv4 + --enable-nfsv3 --with-statedir=/var/lib/nfs --enable-mount" +make_install_target="DESTDIR=$XBPS_DESTDIR/$pkgname-$version install" +short_desc="Network File System utilities" +maintainer="Juan RP " +checksum=9a5da7cd85dc9087222ab348ce82577c38547177d5d4dc7fccc9e939c97d47dc +long_desc=" + The $pkgname package provides a daemon for the kernel NFS server and + related tools, which provides a much higher level of performance than the + traditional Linux NFS server used by most users." + +Add_dependency full glibc +Add_dependency full portmap +Add_dependency build e2fsprogs +Add_dependency build tcp_wrappers +Add_dependency run e2fsprogs-libs +Add_dependency run tcp_wrappers-libs + +post_install() +{ + # Install the rc.d scripts. + for f in mountd nfsd nfslock; do + install -D -m755 ${FILESDIR}/${f} ${DESTDIR}/etc/rc.d/${f} + done +}