diff options
author | bdrewery <bdrewery@FreeBSD.org> | 2016-02-18 00:26:21 +0000 |
---|---|---|
committer | bdrewery <bdrewery@FreeBSD.org> | 2016-02-18 00:26:21 +0000 |
commit | 217f6f397b0a9e44a806ef74dea7a54178242d00 (patch) | |
tree | 217d6c5ab4ffee067d1212d52ffcc30e03706996 | |
parent | 2bf18fe55d769c4c355c1ca0a294cff3996989bb (diff) | |
download | FreeBSD-src-217f6f397b0a9e44a806ef74dea7a54178242d00.zip FreeBSD-src-217f6f397b0a9e44a806ef74dea7a54178242d00.tar.gz |
Fix installation of makewhatis.local(1) since r283777.
The wrapper script has moved to libexec/makewhatis.local since it is not
directlry related to the older makewhatis(1) utility that has been replaced
by the usr.bin/mandoc version.
Reported by: vangyzen
-rw-r--r-- | libexec/Makefile | 5 | ||||
-rw-r--r-- | libexec/makewhatis.local/Makefile | 9 | ||||
-rw-r--r-- | libexec/makewhatis.local/Makefile.depend | 11 | ||||
-rw-r--r-- | libexec/makewhatis.local/makewhatis.local.8 | 83 | ||||
-rw-r--r-- | libexec/makewhatis.local/makewhatis.local.sh | 58 | ||||
-rw-r--r-- | usr.bin/makewhatis/Makefile | 5 |
6 files changed, 166 insertions, 5 deletions
diff --git a/libexec/Makefile b/libexec/Makefile index ca88d9d..a8ace18 100644 --- a/libexec/Makefile +++ b/libexec/Makefile @@ -10,6 +10,7 @@ SUBDIR= ${_atf} \ ${_dma} \ getty \ ${_mail.local} \ + ${_makewhatis.local} \ ${_mknetid} \ ${_pppoed} \ revnetgroup \ @@ -88,6 +89,10 @@ _mail.local= mail.local _smrsh= smrsh .endif +.if ${MK_MAN_UTILS} != "no" +_makewhatis.local= makewhatis.local +.endif + .if ${MK_TALK} != "no" SUBDIR+= talkd .endif diff --git a/libexec/makewhatis.local/Makefile b/libexec/makewhatis.local/Makefile new file mode 100644 index 0000000..9187284 --- /dev/null +++ b/libexec/makewhatis.local/Makefile @@ -0,0 +1,9 @@ +# $FreeBSD$ + +SCRIPTS= makewhatis.local.sh +MAN= makewhatis.local.8 +SCRIPTSDIR= ${LIBEXECDIR} +LINKS= ${SCRIPTSDIR}/makewhatis.local ${SCRIPTSDIR}/catman.local +MLINKS= makewhatis.local.8 catman.local.8 + +.include <bsd.prog.mk> diff --git a/libexec/makewhatis.local/Makefile.depend b/libexec/makewhatis.local/Makefile.depend new file mode 100644 index 0000000..f80275d --- /dev/null +++ b/libexec/makewhatis.local/Makefile.depend @@ -0,0 +1,11 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + + +.include <dirdeps.mk> + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/libexec/makewhatis.local/makewhatis.local.8 b/libexec/makewhatis.local/makewhatis.local.8 new file mode 100644 index 0000000..dfe252f --- /dev/null +++ b/libexec/makewhatis.local/makewhatis.local.8 @@ -0,0 +1,83 @@ +.\" Copyright (c) April 1996 Wolfram Schneider <wosch@FreeBSD.org>. Berlin. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.Dd April 26, 1996 +.Dt MAKEWHATIS.LOCAL 8 +.Os +.Sh NAME +.Nm makewhatis.local , catman.local +.Nd start makewhatis or catman for local file systems +.Sh SYNOPSIS +.Nm /usr/libexec/makewhatis.local +.Op options +.Ar directories ... +.Nm /usr/libexec/catman.local +.Op options +.Ar directories ... +.Sh DESCRIPTION +The +.Nm +utility starts +.Xr makewhatis 1 +only for file systems physically mounted on the system +where the +.Nm +is being executed. +Running makewhatis +by +.Pa periodic weekly +for rw nfs-mounted /usr may kill +your NFS server -- all NFS clients start makewhatis at the same time! +So use this wrapper for +.Xr cron 8 +instead of calling makewhatis directly. +The +.Nm catman.local +utility is using for same purposes as +.Nm +but for +.Xr catman 1 . +.Sh FILES +.Bl -tag -width /etc/periodic/weekly/320.whatis.XXX -compact +.It Pa /etc/periodic/weekly/320.whatis +run +.Nm +every week +.It Pa /etc/periodic/weekly/330.catman +run +.Nm catman.local +every week +.El +.Sh SEE ALSO +.Xr catman 1 , +.Xr find 1 , +.Xr makewhatis 1 , +.Xr cron 8 , +.Xr periodic 8 +.Sh HISTORY +The +.Nm +utility appeared in +.Fx 2.2 . diff --git a/libexec/makewhatis.local/makewhatis.local.sh b/libexec/makewhatis.local/makewhatis.local.sh new file mode 100644 index 0000000..8be2530 --- /dev/null +++ b/libexec/makewhatis.local/makewhatis.local.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# +# Copyright (c) April 1996 Wolfram Schneider <wosch@FreeBSD.org>. Berlin. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# makewhatis.local - start makewhatis(1) only for file systems +# physically mounted on the system +# +# Running makewhatis from /etc/periodic/weekly/320.whatis 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) +# +# $FreeBSD$ + +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 diff --git a/usr.bin/makewhatis/Makefile b/usr.bin/makewhatis/Makefile index 1010949..9530bca 100644 --- a/usr.bin/makewhatis/Makefile +++ b/usr.bin/makewhatis/Makefile @@ -2,10 +2,5 @@ PROG= makewhatis LIBADD= z -SCRIPTS= makewhatis.local.sh -MAN= makewhatis.1 makewhatis.local.8 -SCRIPTSDIR= ${LIBEXECDIR} -LINKS= ${SCRIPTSDIR}/makewhatis.local ${SCRIPTSDIR}/catman.local -MLINKS= makewhatis.local.8 catman.local.8 .include <bsd.prog.mk> |