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

Gary gary_kay at rta.nsw.gov.au
Mon Nov 30 21:45:29 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?




More information about the cups mailing list