Subject: misc/5713: New flag for lp
To: None <gnats-bugs@gnats.netbsd.org>
From: None <darcy@druid.net>
List: netbsd-bugs
Date: 07/06/1998 14:37:42
>Number:         5713
>Category:       misc
>Synopsis:       Some SVR4 programs assume lp takes -s option
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    misc-bug-people (Misc Bug People)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Jul  6 11:50:00 1998
>Last-Modified:
>Originator:     D'Arcy J.M. Cain
>Organization:
D'Arcy J.M. Cain <darcy@{druid|vex}.net>   |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 424 2871     (DoD#0082)    (eNTP)   |  what's for dinner.
>Release:        NetBSD-current
>Environment:
	
System: NetBSD druid.net 1.3F NetBSD 1.3F (DRUID) #0: Thu Jul 2 01:27:00 EDT 1998 root@:/usr/src/sys/arch/i386/compile/DRUID i386


>Description:
	The SVR4 lp command takes a -s option to specify that symlinks should
	be used rather than copying.  Under NetBSD, this is the default.  By
	adding the -s option, SVR4 programs which have lp command lines
	hard coded in the binaries will work under SVR4 emulation.
>How-To-Repeat:
	Run lp -s
>Fix:
*** ../src.original/./usr.sbin/lpr/lp/lp	Mon Jul  6 14:22:08 1998
--- ./usr.sbin/lpr/lp/lp	Mon Jul  6 14:28:08 1998
***************
*** 50,61 ****
  # 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.
  #
! while getopts "cd:n:o:" option
  do
  	case $option in
  
  	c)			# copy files before printing
  		symlink="";;
  	d)			# destination
  		dest="${OPTARG}";;
  	n)			# number of copies
--- 50,63 ----
  # 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.
  #
! while getopts "csd:n:o:" option
  do
  	case $option in
  
  	c)			# copy files before printing
  		symlink="";;
+ 	s)			# SVR4 compatibility
+ 		symlink="-s";;
  	d)			# destination
  		dest="${OPTARG}";;
  	n)			# number of copies
>Audit-Trail:
>Unformatted: