Subject: Re: misc/5713: New flag for lp
To: None <darcy@druid.net>
From: Klaus Klein <kleink@ira.uka.de>
List: netbsd-bugs
Date: 07/07/1998 17:58:55
darcy@druid.net writes:

> >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:


On SVR4 (and UNIX98 systems), the `-s' flag actually means `silent
operation', rather than `symlink', so the appropriate addition to the
lp wrapper script would be to recognize and ignore it.