SUMMARY: Has anyone seen LP options changes under Solaris 10 (05/08)?

From: Matthew Stier <Matthew.Stier_at_us.fujitsu.com>
Date: Sun Aug 17 2008 - 23:53:10 EDT
Found it, and the only fix is to modify the 'interfaces' scripts to 
accept both pre and post PAPI boolean options.

With Solaris 10 05/08, Sun implemented the PAPI interface, to support 
multiple printing back ends.  (BSD/IPP/CUPS/...)

The lp command calls the papiAttributeListFromString() function to 
process each option. 

    
http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/print/bsd-sysv-commands/lp.c
    http://src.opensolaris.org/source/s?defs=papiAttributeListFromString

The papiAttributeListFromString calls a _parse_attribute_list() 
function, who job it is to process the numerous option argument 
formats.  Near the end of the function, it process boolean (key only) 
options. The first thing the boolean key code does is convert the 
boolean key into a key=value pair, with the key being set to a value of 
"true".  It then test the first two characters of the key to see if it 
begins with "no". If it does, it removes the "no" prefix, and sets the 
new key to "false".  (ie: "banner" becomes "banner=true". "nobanner" 
becomes "banner=false".)

    http://src.opensolaris.org/source/s?refs=_parse_attribute_list
    (lines 853-861)

Thus the only fix is to go through each interfaces script, and modify 
the code that process the options, to accept both 'key' and 'key=value' 
options.


Jan Dreyer wrote:
> Hi,
>
> though your message is quiet old, I would like to point out, that we 
> encountered similar problems with clients on HP-UX. Our solution was 
> to fix the scripts which send the data and make little tweaks to our 
> own scripts in .../interfaces.
>
> Did you find another solution or a hint what SUN changed?
>
> Greetings
> Jan Dreyer
>
>
> Matthew Stier schrieb:
>> I've just deployed Solaris 10 (05/08) to a number of users, and an 
>> encountering a problem with some /etc/lp/interfaces scripts I wrote 
>> years ago.  This problems has not been encountered on any previous 
>> release of Solaris 10, or 9, 8, 7, ...
>>
>> It appears that the latest release of Solaris 10 tweaks the 'lp' 
>> options, modifying simple "options" into "option=value".  As an 
>> example, if I specify "-o simplex" on the commandline, it is 
>> forwarded to the (Solaris 8) printer server as "simplex=true".
>>
>> Google, SunSolve, and docs.sun.com have been fruitless so far.
>>
>> [demime 1.01b removed an attachment of type text/x-vcard which had a 
>> name of Matthew_Stier.vcf]
>> _______________________________________________
>> sunmanagers mailing list
>> sunmanagers@sunmanagers.org
>> http://www.sunmanagers.org/mailman/listinfo/sunmanagers
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Sun Aug 17 23:55:22 2008

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:44:11 EST