From owner-svn-src-stable@FreeBSD.ORG Sun Jul 5 06:32:10 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA7D91065677; Sun, 5 Jul 2009 06:32:10 +0000 (UTC) (envelope-from brian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BE41A8FC25; Sun, 5 Jul 2009 06:32:10 +0000 (UTC) (envelope-from brian@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n656WAMf039328; Sun, 5 Jul 2009 06:32:10 GMT (envelope-from brian@svn.freebsd.org) Received: (from brian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n656WAYV039325; Sun, 5 Jul 2009 06:32:10 GMT (envelope-from brian@svn.freebsd.org) Message-Id: <200907050632.n656WAYV039325@svn.freebsd.org> From: Brian Somers Date: Sun, 5 Jul 2009 06:32:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195349 - in stable/7/usr.sbin/lpr: . lp X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2009 06:32:11 -0000 Author: brian Date: Sun Jul 5 06:32:10 2009 New Revision: 195349 URL: http://svn.freebsd.org/changeset/base/195349 Log: MFC: Add -m and -t options. PR: 129554 Modified: stable/7/usr.sbin/lpr/ (props changed) stable/7/usr.sbin/lpr/lp/lp.1 stable/7/usr.sbin/lpr/lp/lp.sh Modified: stable/7/usr.sbin/lpr/lp/lp.1 ============================================================================== --- stable/7/usr.sbin/lpr/lp/lp.1 Sun Jul 5 06:28:23 2009 (r195348) +++ stable/7/usr.sbin/lpr/lp/lp.1 Sun Jul 5 06:32:10 2009 (r195349) @@ -78,6 +78,8 @@ or .Ev PRINTER (with this precedence) are taken as the destination printer. +.It Fl m +Send mail upon completion. .It Fl n Ar num Specify that .Ar num @@ -91,6 +93,9 @@ Silent operation. Not supported, provided only as a compatibility option for .St -susv2 . +.It Fl t Ar title +Set the job title to +.Ar title . .El .Sh ENVIRONMENT As described above, the variables Modified: stable/7/usr.sbin/lpr/lp/lp.sh ============================================================================== --- stable/7/usr.sbin/lpr/lp/lp.sh Sun Jul 5 06:28:23 2009 (r195348) +++ stable/7/usr.sbin/lpr/lp/lp.sh Sun Jul 5 06:32:10 2009 (r195349) @@ -41,6 +41,8 @@ ncopies="" symlink="-s" +mailafter="" +title="" # Posix says LPDEST gets precedence over PRINTER dest=${LPDEST:-${PRINTER:-lp}} @@ -51,7 +53,7 @@ dest=${LPDEST:-${PRINTER:-lp}} # XXX We include the -s flag as a dummy. SUSv2 requires it, # although we do not yet emit the affected messages. # -while getopts "cd:n:o:s" option +while getopts "cd:mn:o:st:" option do case $option in @@ -59,12 +61,16 @@ do symlink="";; d) # destination dest="${OPTARG}";; + m) # mail after job + mailafter="-m";; n) # number of copies ncopies="-#${OPTARG}";; o) # (printer option) : ;; s) # (silent option) : ;; + t) # title for banner page + title="-J${OPTARG}";; *) # (error msg printed by getopts) exit 2;; esac @@ -72,4 +78,4 @@ done shift $(($OPTIND - 1)) -exec /usr/bin/lpr "-P${dest}" ${symlink} ${ncopies} "$@" +exec /usr/bin/lpr "-P${dest}" ${symlink} ${ncopies} ${mailafter} "${title}" "$@"