From owner-svn-src-head@freebsd.org Fri Jul 24 09:10:04 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DEF279A994F; Fri, 24 Jul 2015 09:10:04 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CDD0E10F8; Fri, 24 Jul 2015 09:10:04 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6O9A46O096923; Fri, 24 Jul 2015 09:10:04 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6O9A4Cj096922; Fri, 24 Jul 2015 09:10:04 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201507240910.t6O9A4Cj096922@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 24 Jul 2015 09:10:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285835 - head/usr.bin/man X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jul 2015 09:10:05 -0000 Author: bapt Date: Fri Jul 24 09:10:03 2015 New Revision: 285835 URL: https://svnweb.freebsd.org/changeset/base/285835 Log: Fix man -k with mandocdb If apropos(1) and whatis(1) are not hardlinks to man(1) that means the system is using mandocdb, then man -k should spawn apropos(1) and/or whatis(1) directly Reported by: kevlo Tested by: kevlo Sponsored by: gandi.net Modified: head/usr.bin/man/man.sh Modified: head/usr.bin/man/man.sh ============================================================================== --- head/usr.bin/man/man.sh Fri Jul 24 07:46:02 2015 (r285834) +++ head/usr.bin/man/man.sh Fri Jul 24 09:10:03 2015 (r285835) @@ -925,6 +925,8 @@ whatis_usage() { # Supported commands do_apropos() { + [ $(stat -f %i /usr/bin/man) -eq $(stat -f %i /usr/bin/apropos) ] && \ + exec apropos "$@" search_whatis apropos "$@" } @@ -960,6 +962,8 @@ do_manpath() { } do_whatis() { + [ $(stat -f %i /usr/bin/man) -eq $(stat -f %i /usr/bin/whatis) ] && \ + exec whatis "$@" search_whatis whatis "$@" }