diff options
author | wosch <wosch@FreeBSD.org> | 1996-05-12 21:02:04 +0000 |
---|---|---|
committer | wosch <wosch@FreeBSD.org> | 1996-05-12 21:02:04 +0000 |
commit | 1474db4aa46ad6f5df45b58dfd95c8e5a83695b1 (patch) | |
tree | 9cff49ef17301e095986d7862ba84279961e0b20 /usr.bin | |
parent | 716641bdae47d54927443ba5501780528d499c88 (diff) | |
download | FreeBSD-src-1474db4aa46ad6f5df45b58dfd95c8e5a83695b1.zip FreeBSD-src-1474db4aa46ad6f5df45b58dfd95c8e5a83695b1.tar.gz |
Bugfix: nested *?+ in regexp at /usr/bin/makewhatis line 286
Submitted by: invalid opcode <coredump@nervosa.com>
makewhatis.local - start makewhatis(1) only for file systems
physically mounted on the system
Running makewhatis from /etc/weekly for rw nfs-mounted /usr may kill
your NFS server -- all clients start makewhatis at the same time!
So use this wrapper instead calling makewhatis directly.
Pointed out by: Bruce
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/makewhatis/makewhatis.local.sh | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/usr.bin/makewhatis/makewhatis.local.sh b/usr.bin/makewhatis/makewhatis.local.sh new file mode 100644 index 0000000..5260e89 --- /dev/null +++ b/usr.bin/makewhatis/makewhatis.local.sh @@ -0,0 +1,35 @@ +#!/bin/sh +# (c) Wolfram Schneider, Berlin. April 1996. Public Domain. +# +# makewhatis.local - start makewhatis(1) only for file systems +# physically mounted on the system +# +# Running makewhatis from /etc/weekly for rw nfs-mounted /usr may kill +# your NFS server -- all clients start makewhatis at the same time! +# So use this wrapper instead calling makewhatis directly. +# +# PS: this wrapper works also for catman(1) +# +# $Id: makewhatis.local.sh,v 1.2 1996/04/27 12:17:01 wosch Exp $ + +PATH=/bin:/usr/bin:$PATH; export PATH +opt= dirs= localdirs= + +for arg +do + case "$arg" in + -*) opt="$opt $arg";; + *) dirs="$dirs $arg";; + esac +done + +dirs=`echo $dirs | sed 's/:/ /g'` +case X"$dirs" in X) echo "usage: $0 [options] directories ..."; exit 1;; esac + +localdirs=`find -H $dirs -fstype local -type d -prune -print` + +case X"$localdirs" in + X) echo "$0: no local-mounted manual directories found: $dirs" + exit 1;; + *) exec `basename $0 .local` $opt $localdirs;; +esac |