diff options
author | Aron Griffis <agriffis@gentoo.org> | 2002-01-13 22:29:12 +0000 |
---|---|---|
committer | Aron Griffis <agriffis@gentoo.org> | 2002-01-13 22:29:12 +0000 |
commit | 5eb95b1bd084465f0893941cab3ff30a515b02e5 (patch) | |
tree | 440632fb4b03137799da800e337ef29d660edac5 /net-fs | |
parent | shout version 0.8.0, initial ebuild (diff) | |
download | gentoo-2-5eb95b1bd084465f0893941cab3ff30a515b02e5.tar.gz gentoo-2-5eb95b1bd084465f0893941cab3ff30a515b02e5.tar.bz2 gentoo-2-5eb95b1bd084465f0893941cab3ff30a515b02e5.zip |
new version of nfs-utils, smarter startup/shutdown scripts.
Diffstat (limited to 'net-fs')
-rw-r--r-- | net-fs/nfs-utils/files/exports | 4 | ||||
-rw-r--r-- | net-fs/nfs-utils/files/nfs.rc6 | 33 | ||||
-rw-r--r-- | net-fs/nfs-utils/files/nfsmount.rc6 | 6 | ||||
-rw-r--r-- | net-fs/nfs-utils/nfs-utils-0.3.3.ebuild | 58 |
4 files changed, 89 insertions, 12 deletions
diff --git a/net-fs/nfs-utils/files/exports b/net-fs/nfs-utils/files/exports index b1677f1638d5..5102ef27c150 100644 --- a/net-fs/nfs-utils/files/exports +++ b/net-fs/nfs-utils/files/exports @@ -1,3 +1 @@ -# -#nfsserver_home eth0_net/eth0_mask(rw) - +# /etc/exports: NFS file systems being exported. See exports(5). diff --git a/net-fs/nfs-utils/files/nfs.rc6 b/net-fs/nfs-utils/files/nfs.rc6 index 60fad1963f1a..ce4d85379fec 100644 --- a/net-fs/nfs-utils/files/nfs.rc6 +++ b/net-fs/nfs-utils/files/nfs.rc6 @@ -1,14 +1,14 @@ #!/sbin/runscript # Copyright 1999-2002 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later -# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/nfs.rc6,v 1.1 2001/12/23 23:25:19 azarah Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/nfs.rc6,v 1.2 2002/01/13 22:29:12 agriffis Exp $ #--------------------------------------------------------------------------- # This script starts/stops the following -# rpc.statd if necessary (also checked by init.d/nfsmount) -# rpd.rquotad -# rpd.nfsd -# rpc.mountd +# rpc.statd if necessary (also checked by init.d/nfsmount) +# rpd.rquotad +# rpd.nfsd +# rpc.mountd #--------------------------------------------------------------------------- # NB: Config is in /etc/conf.d/nfs @@ -48,9 +48,14 @@ start() { then start_statd + # Exportfs likes to hang if networking isn't working. + # If that's the case, then try to kill it so the + # bootup process can continue. if grep -q '^/' /etc/exports &>/dev/null; then ebegin "Exporting NFS directories" - /sbin/exportfs -r 1>&2 + /sbin/exportfs -r 1>&2 & + ( sleep 5; kill -9 $! &>/dev/null & ) + wait eend $? "Error exporting NFS directories" fi @@ -106,7 +111,12 @@ stop() { # to umount/(re)mount the filesystem. if [ "$RESTARTING" = no ]; then ebegin "Unexporting NFS directories" - /sbin/exportfs -ua 1>&2 + # Exportfs likes to hang if networking isn't working. + # If that's the case, then try to kill it so the + # bootup process can continue. + /sbin/exportfs -ua 1>&2 & + ( sleep 5; kill -9 $! &>/dev/null & ) + wait eend $? "Error unexporting NFS directories" fi @@ -114,7 +124,14 @@ stop() { } reload() { - /sbin/exportfs -r + # Exportfs likes to hang if networking isn't working. + # If that's the case, then try to kill it so the + # bootup process can continue. + ebegin "Reloading /etc/exports" + /sbin/exportfs -r 1>&2 & + ( sleep 5; kill -9 $! &>/dev/null & ) + wait + eend $? "Error exporting NFS directories" } restart() { diff --git a/net-fs/nfs-utils/files/nfsmount.rc6 b/net-fs/nfs-utils/files/nfsmount.rc6 index f1acd82d86c1..83ea67edf258 100644 --- a/net-fs/nfs-utils/files/nfsmount.rc6 +++ b/net-fs/nfs-utils/files/nfsmount.rc6 @@ -1,7 +1,7 @@ #!/sbin/runscript # Copyright 1999-2002 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later -# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/nfsmount.rc6,v 1.1 2001/12/23 23:25:19 azarah Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/nfsmount.rc6,v 1.2 2002/01/13 22:29:12 agriffis Exp $ depend() { need net portmap @@ -40,3 +40,7 @@ stop() { stop_statd } +restart() { + stop + start +} diff --git a/net-fs/nfs-utils/nfs-utils-0.3.3.ebuild b/net-fs/nfs-utils/nfs-utils-0.3.3.ebuild new file mode 100644 index 000000000000..723f657da49c --- /dev/null +++ b/net-fs/nfs-utils/nfs-utils-0.3.3.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2000 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# Author: Aron Griffis <agriffis@gentoo.org> +# Maintainer: System Team +# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/nfs-utils-0.3.3.ebuild,v 1.1 2002/01/13 22:29:12 agriffis Exp $ + +S=${WORKDIR}/${P} +DESCRIPTION="kernel NFS client and server daemons" +SRC_URI="http://download.sourceforge.net/nfs/${P}.tar.gz" +HOMEPAGE="http://nfs.sourceforge.net/" + +DEPEND=" + virtual/glibc + tcpd? ( sys-apps/tcp-wrappers )" + +RDEPEND=" + virtual/glibc + >=net-nds/portmap-5b-r6" + +src_unpack() { + unpack ${A} + cd ${S} + patch -p1 < ${FILESDIR}/${PF}-gentoo.diff +} + +src_compile() { + ./configure \ + --prefix=/ \ + --mandir=/usr/share/man \ + --with-statedir=/var/lib/nfs \ + --enable-nfsv3 || die + if ! use tcpd; then + cp config.mk config.mk.orig + sed -e "s:-lwrap::" -e "s:-DHAVE_TCP_WRAPPER::" \ + config.mk.orig > config.mk + fi + make || die +} + +src_install() { + # MANDIR doesn't pick up install_prefix + make install install_prefix=$D MANDIR=$D/usr/share/man + insinto /etc + doins $FILESDIR/exports + dodoc ChangeLog COPYING README + docinto linux-nfs + dodoc linux-nfs/* + # using newexe/newins instead of doexe/doins allows us to specify + # a new filename on the command-line. + exeinto /etc/init.d + newexe ${FILESDIR}/nfs.rc6 nfs + newexe ${FILESDIR}/nfsmount.rc6 nfsmount + insinto /etc/conf.d + newins ${FILESDIR}/nfs.confd nfs + # Don't create runlevels symlinks here. NFS is not something that + # should be enabled by default. Administrators can use rc-update + # to do it themselves. +} |