From owner-svn-src-all@FreeBSD.ORG Sat Feb 5 06:25:22 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 432CF106564A; Sat, 5 Feb 2011 06:25:22 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 15E058FC08; Sat, 5 Feb 2011 06:25:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p156PLff017101; Sat, 5 Feb 2011 06:25:21 GMT (envelope-from gordon@svn.freebsd.org) Received: (from gordon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p156PLaC017099; Sat, 5 Feb 2011 06:25:21 GMT (envelope-from gordon@svn.freebsd.org) Message-Id: <201102050625.p156PLaC017099@svn.freebsd.org> From: Gordon Tetlow Date: Sat, 5 Feb 2011 06:25:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218312 - stable/8/usr.sbin/freebsd-update X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Feb 2011 06:25:22 -0000 Author: gordon Date: Sat Feb 5 06:25:21 2011 New Revision: 218312 URL: http://svn.freebsd.org/changeset/base/218312 Log: MFC r217767: Honor $PAGER instead of always calling more. Approved by: colin@ Modified: stable/8/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/8/usr.sbin/freebsd-update/ (props changed) Modified: stable/8/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- stable/8/usr.sbin/freebsd-update/freebsd-update.sh Sat Feb 5 03:36:34 2011 (r218311) +++ stable/8/usr.sbin/freebsd-update/freebsd-update.sh Sat Feb 5 06:25:21 2011 (r218312) @@ -1860,7 +1860,7 @@ fetch_create_manifest () { echo -n "been downloaded because the files have been " echo "modified locally:" cat modifiedfiles - fi | more + fi | $PAGER rm modifiedfiles # If no files will be updated, tell the user and exit @@ -1890,7 +1890,7 @@ fetch_create_manifest () { echo -n "The following files will be removed " echo "as part of updating to ${RELNUM}-p${RELPATCHNUM}:" cat files.removed - fi | more + fi | $PAGER rm files.removed # Report added files, if any @@ -1899,7 +1899,7 @@ fetch_create_manifest () { echo -n "The following files will be added " echo "as part of updating to ${RELNUM}-p${RELPATCHNUM}:" cat files.added - fi | more + fi | $PAGER rm files.added # Report updated files, if any @@ -1909,7 +1909,7 @@ fetch_create_manifest () { echo "as part of updating to ${RELNUM}-p${RELPATCHNUM}:" cat files.updated - fi | more + fi | $PAGER rm files.updated # Create a directory for the install manifest. @@ -3183,6 +3183,11 @@ cmd_IDS () { # Make sure we find utilities from the base system export PATH=/sbin:/bin:/usr/sbin:/usr/bin:${PATH} +# Set a pager if the user doesn't +if [ -z "$PAGER" ]; then + PAGER=/usr/bin/more +fi + # Set LC_ALL in order to avoid problems with character ranges like [A-Z]. export LC_ALL=C