Migrate from Solaris lp to CUPS lp without lpd -o options

Gary gary_kay at rta.nsw.gov.au
Tue Dec 1 21:34:59 PST 2009


> > During a possible migration to CUPS - all 150+ Solaris10 (and some Solaris 9) sites will be slowly phased in to using CUPS.
> > The issue is that the Solaris servers still need to be able to print to the lpd queues using the lpd client from the servers using CUPS, and previous lp -o options need to be preserved.
> > A big bang approach of switching all sites to CUPS (all using ipp) in one go is currently not an option (even though that would be ideal).
> >
> > Is there any way to preserve these -o options? Also there will be a windows server running an lpd queue, so also printing via CUPS from the solaris clients means these -o options will also disappear.
> > So really how else can this command be written:
> > lp -c -dremoteprinter -oopt1 -oopt2 -ooptn
> > if lpstat -v remoteprinter is:
> > device for remoterinter: lpd://remotesite/remotequeue
> > Is there a way to set these options in a banner? or somewhere else? The server side on windows would typically use the control file to interpret the options.
>
> Going by what OpenSolaris do - something like:
>  lpd://localhost/printers/queue[#extensions]
> where optional #extensions can be specified as #solaris
> Unless someone else has done otherwise I was planning on updating my own copy of lpd.c and cups-lpd.c to handle these options and do something like:
>   lpd://localhost/queue[?extensions=solaris]
> where the extensions value could be solaris or none (the default).
> If solaris is required then argv[3] will be set in the control file with the prefix command character O.
> cups-lpd can then just be extended to take -o solaris to read in the Ooptions received in the incoming control file.
>
> Thoughts?

Actually I meant argv[5] and not argv[3] above. I also suggest that argv[5] filters out the cups specific options like document-name, finishings, number-up and job-uuid - since they are not needed on the remote non cups lpd queue.
I've made this change in my lpd.c and it seems to work fine for me.





More information about the cups mailing list