aboutsummaryrefslogtreecommitdiff
path: root/gnu/usr.bin/man/makewhatis/makewhatis.perl
diff options
context:
space:
mode:
authorWolfram Schneider <wosch@FreeBSD.org>1996-05-12 21:02:04 +0000
committerWolfram Schneider <wosch@FreeBSD.org>1996-05-12 21:02:04 +0000
commit7d732d1e4fa1f51ad09d3cdd0fe5c8a8c8789bc9 (patch)
tree9cff49ef17301e095986d7862ba84279961e0b20 /gnu/usr.bin/man/makewhatis/makewhatis.perl
parentd7b71c676e8144df99554c15e86e2e6575171913 (diff)
downloadsrc-7d732d1e4fa1f51ad09d3cdd0fe5c8a8c8789bc9.tar.gz
src-7d732d1e4fa1f51ad09d3cdd0fe5c8a8c8789bc9.zip
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
Notes
Notes: svn path=/head/; revision=15755
Diffstat (limited to 'gnu/usr.bin/man/makewhatis/makewhatis.perl')
-rw-r--r--gnu/usr.bin/man/makewhatis/makewhatis.perl10
1 files changed, 6 insertions, 4 deletions
diff --git a/gnu/usr.bin/man/makewhatis/makewhatis.perl b/gnu/usr.bin/man/makewhatis/makewhatis.perl
index 02f11a36eabb..ca3581683c07 100644
--- a/gnu/usr.bin/man/makewhatis/makewhatis.perl
+++ b/gnu/usr.bin/man/makewhatis/makewhatis.perl
@@ -35,7 +35,7 @@
#
# E-Mail: Wolfram Schneider <wosch@cs.tu-berlin.de>
#
-# $Id: makewhatis.perl,v 1.6 1995/04/01 11:43:09 joerg Exp $
+# $Id: makewhatis.perl,v 1.7 1995/09/10 13:05:52 joerg Exp $
#
sub usage {
@@ -280,12 +280,14 @@ sub manpagename {
return if $name eq $_;
}
- $name =~ s=\[=\\\[=g; # shit '['
+ local($f) = $file;
+ $f =~ s%/*[^/]+$%%;
+
foreach (split(/,\s+/, $man)) {
s/\(.+//;
- ($f = $file) =~ s/$name/$_/;
+
# a keyword exist as file
- return if -e "$f";
+ return if -e "$f/$_";
}
$man .= ", $name($extension)";