From brooks@sense-brooks-226.oz.net  Tue Mar  7 16:19:29 2000
Return-Path: <brooks@sense-brooks-226.oz.net>
Received: from sense-brooks-226.oz.net (sense-brooks-226.oz.net [216.39.156.226])
	by hub.freebsd.org (Postfix) with ESMTP id C82BA37B620
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  7 Mar 2000 16:19:15 -0800 (PST)
	(envelope-from brooks@sense-brooks-226.oz.net)
Received: (from brooks@localhost)
	by sense-brooks-226.oz.net (8.9.3/8.9.3) id QAA20280;
	Tue, 7 Mar 2000 16:18:44 -0800 (PST)
	(envelope-from brooks)
Message-Id: <200003080018.QAA20280@sense-brooks-226.oz.net>
Date: Tue, 7 Mar 2000 16:18:44 -0800 (PST)
From: brooks@one-eyed-alien.net
Sender: brooks@sense-brooks-226.oz.net
Reply-To: brooks@one-eyed-alien.net
To: FreeBSD-gnats-submit@freebsd.org
Subject: lp should take the -s option
X-Send-Pr-Version: 3.2

>Number:         17256
>Category:       bin
>Synopsis:       lp should take the -s option
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    sheldonh
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Mar  7 16:20:01 PST 2000
>Closed-Date:    Wed Mar 8 02:32:55 PST 2000
>Last-Modified:  Wed Mar  8 02:34:45 PST 2000
>Originator:     Brooks Davis
>Release:        FreeBSD 4.0-CURRENT i386
>Organization:
Aerospace Corporation
>Environment:

4.0-CURRENT.  Also effects prior versions

>Description:

the lp shell script should take the -s (silence) option.  lpr is
basicaly silent anyway and Applixware insists on calling lp with the -s
option.  Accepting and throwing it way makes printing work out of the
box and doesn't appear to behave incorrectly.

>How-To-Repeat:

lp -s <file>

>Fix:

Index: usr.sbin/lpr/lp/lp.sh
===================================================================
RCS file: /home/ncvs/src/usr.sbin/lpr/lp/lp.sh,v
retrieving revision 1.6
diff -u -r1.6 lp.sh
--- usr.sbin/lpr/lp/lp.sh	1999/08/28 01:16:50	1.6
+++ usr.sbin/lpr/lp/lp.sh	2000/03/08 00:12:19
@@ -48,8 +48,10 @@
 #
 # XXX We include the -o flag as a dummy.  Posix 1003.2 does not require
 # it, but the rationale mentions it as a possible future extension.
+# XXX Applixware insists on the -s option.  It appears that lpr is
+# generally silent so eating the option does the right thing.
 #
-while getopts "cd:n:o:" option
+while getopts "cd:n:o:s" option
 do
 	case $option in
 
@@ -61,6 +63,8 @@
 		ncopies="-#${OPTARG}";;
 	o)			# (printer option)
 		: ;;
+	s)			# (silence)
+		;;
 	*)			# (error msg printed by getopts)
 		exit 2;;
 	esac

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->sheldonh 
Responsible-Changed-By: sheldonh 
Responsible-Changed-When: Tue Mar 7 16:48:37 PST 2000 
Responsible-Changed-Why:  
I'll take this one.  It would be nice to get this in for 4.0-RELEASE 
for Applix-friendliness. 
State-Changed-From-To: open->closed 
State-Changed-By: sheldonh 
State-Changed-When: Wed Mar 8 02:32:55 PST 2000 
State-Changed-Why:  
Thanks for the report.  Supporting Applix is a very good thing. 
The change has been committed to CURRENT and merged into STABLE 
as re 1.5.2.2. 
>Unformatted:
