Subject: bin/1161: NetBSD doesn't come with an exportfs(8) command.
To: None <gnats-admin@sun-lamp.pc.cs.cmu.edu>
From: None <mrg@mame.mu.OZ.AU>
List: netbsd-bugs
Date: 06/27/1995 06:35:03
>Number: 1161
>Category: bin
>Synopsis: NetBSD doesn't come with an exportfs(8) command.
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Tue Jun 27 06:35:02 1995
>Originator: matthew green
>Organization:
bozotic softwar foundation
>Release: 20/6/95
>Environment:
System: NetBSD splode.eterna.com.au 1.0A NetBSD 1.0A (_splode_) #235: Thu Jun 22 22:40:35 EST 1995 mrg@splode.eterna.com.au:/orb/q/build/src/sys/arch/sparc/compile/_splode_ sparc
>Description:
to re-export the directories listed in /etc/exports, one must
kill -HUP `cat /var/run/mountd.pid`, which is annoying to type.
below is an exportfs script to do this for you. it might be
nice if it was in the source tree somewhere.
>How-To-Repeat:
>Fix:
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# exportfs
# exportfs/Makefile
# exportfs/exportfs.8
# exportfs/exportfs.sh
#
echo c - exportfs
mkdir -p exportfs > /dev/null 2>&1
echo x - exportfs/Makefile
sed 's/^X//' >exportfs/Makefile << 'END-of-exportfs/Makefile'
X# $NetBSD$
X
XMAN= exportfs.8
X
Xbeforeinstall:
X install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
X ${.CURDIR}/exportfs.sh ${DESTDIR}/sbin/exportfs
X
X.include <bsd.prog.mk>
END-of-exportfs/Makefile
echo x - exportfs/exportfs.8
sed 's/^X//' >exportfs/exportfs.8 << 'END-of-exportfs/exportfs.8'
X.\" $NetBSD$
X.\"
X.\" Copyright (c) 1995 Matthew Green.
X.\"
X.\" Redistribution and use in source and binary forms, with or without
X.\" modification, are permitted provided that the following conditions
X.\" are met:
X.\" 1. Redistributions of source code must retain the above copyright
X.\" notice, this list of conditions and the following disclaimer.
X.\" 2. Redistributions in binary form must reproduce the above copyright
X.\" notice, this list of conditions and the following disclaimer in the
X.\" documentation and/or other materials provided with the distribution.
X.\" 3. All advertising materials mentioning features or use of this software
X.\" must display the following acknowledgement:
X.\" This product includes software developed by Matthew Green
X.\" 4. Neither the name of the University nor the names of its contributors
X.\" may be used to endorse or promote products derived from this software
X.\" without specific prior written permission.
X.\"
X.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
X.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
X.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
X.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
X.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
X.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
X.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
X.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
X.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
X.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
X.\" SUCH DAMAGE.
X.\"
X.Dd June 27, 1995
X.Dt EXPORTFS 8
X.Os BSD 4.4
X.Sh NAME
X.Nm exportfs
X.Nd export a list of file systems.
X.Sh SYNOPSIS
X.Nm exportfs
X.Op Fl a
X.Sh DESCRIPTION
X.Nm Exportfs
XSends a SIGHUP signal to the running mountd(8) process by looking at the
X.Nm /var/run/mountd.pid
Xfile. The
X.Fl a
Xoption is provided for backwards compability with older versions of this
Xprogram.
X.Sh SEE ALSO
X.Xr mountd 8
END-of-exportfs/exportfs.8
echo x - exportfs/exportfs.sh
sed 's/^X//' >exportfs/exportfs.sh << 'END-of-exportfs/exportfs.sh'
X#! /bin/sh
X#
X# Copyright (c) 1995 Matthew Green.
X
XPF=/var/run/mountd.pid
Xif test $# -gt 0 -a "x$1" != "x-a"; then
X echo "Usage: exportfs [-a]"
X exit 1
Xfi
X
Xif test -f $PF; then
X kill -HUP `cat $PF`
X exit 0
Xelse
X echo "exportfs: Can't find $PF" 1>&2
X exit 1
Xfi
END-of-exportfs/exportfs.sh
exit
>Audit-Trail:
>Unformatted: