From owner-freebsd-bugs Tue Jul 11 18:20: 6 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 3DAE437BA2E for ; Tue, 11 Jul 2000 18:20:00 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id SAA24445; Tue, 11 Jul 2000 18:20:00 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from Awfulhak.org (tun.AwfulHak.org [194.242.139.173]) by hub.freebsd.org (Postfix) with ESMTP id E73A237BABC for ; Tue, 11 Jul 2000 18:09:31 -0700 (PDT) (envelope-from brian@Awfulhak.org) Received: from hak.lan.Awfulhak.org (root@hak.lan.awfulhak.org [172.16.0.12]) by Awfulhak.org (8.9.3/8.9.3) with ESMTP id CAA84762 for ; Wed, 12 Jul 2000 02:10:08 +0100 (BST) (envelope-from brian@hak.lan.Awfulhak.org) Received: (from brian@localhost) by hak.lan.Awfulhak.org (8.9.3/8.9.3) id CAA29246; Wed, 12 Jul 2000 02:09:26 +0100 (BST) (envelope-from brian) Message-Id: <200007120109.CAA29246@hak.lan.Awfulhak.org> Date: Wed, 12 Jul 2000 02:09:26 +0100 (BST) From: brian@Awfulhak.org Reply-To: brian@Awfulhak.org To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/19858: mergemasters interpretation of $PAGER is incorrect [PATCH] Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 19858 >Category: bin >Synopsis: mergemasters interpretation of $PAGER is incorrect [PATCH] >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Jul 11 18:20:00 PDT 2000 >Closed-Date: >Last-Modified: >Originator: Brian Somers >Release: FreeBSD 5.0-CURRENT i386 >Organization: Awfulhak Ltd. >Environment: Stock -current system >Description: Mergemaster treats ``more'' as an exception to it's requirement that $PAGER specifies a full path name. It also tests if ${PAGER%% *} is executable which is incorrect when ${PAGER} is not absolute. >How-To-Repeat: Run mergemaster with a $PAGER that contains a non-absolute path name. >Fix: Index: mergemaster.sh =================================================================== RCS file: /home/ncvs/src/usr.sbin/mergemaster/mergemaster.sh,v retrieving revision 1.8 diff -u -r1.8 mergemaster.sh --- mergemaster.sh 2000/05/12 03:09:57 1.8 +++ mergemaster.sh 2000/06/30 10:04:40 @@ -252,7 +252,7 @@ # case "${DONT_CHECK_PAGER}" in '') - while [ "${PAGER}" != "more" -a -n "${PAGER}" -a ! -x "${PAGER%% *}" ]; do + while ! type "${PAGER%% *}" >/dev/null && [ -n "$PAGER" ]; do echo " *** Your PAGER environment variable specifies '${PAGER}', but" echo " I cannot execute it. In general it is good practice to" echo " specify the full path for environment variables like" >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message