Operating System - Linux
1752810 Members
6053 Online
108789 Solutions
New Discussion юеВ

Re: Cups Question .... Again....

 
SOLVED
Go to solution
rmueller58
Valued Contributor

Cups Question .... Again....

I have to admit my ignorance about CUPS. (i bought the book though :-) and am RTFM.

to make a long story short, we are currently running HP/UX but will be migrating to RHEL5..

Kind of looking for a solution of sorts for converting from HP/UX "addqueue/hppi jetadmin" created queue to CUPS, and HOW you did it if you've done it. ?

As I've been using jet admin to create physical queues, and
We have in the neighborhood of 300 physical jetadmin queues and each queue have 4-6 corresponding logical queues for "options" Options of primary are as follows:

Portrait "-ovsi7.27"
Portrait Compressed = "-oc -vsi7.27"
Landscape = "-olandscape"
landscape Compressed " olandscape -oc -ovsi5.45"

(Where VSI=vertical space per inch)

obviously other options as well.


I need to make changes to 1200+ entries to command entry into several database, I do have a length constraint that the command can only be 60 characters in length.

Does someone have a HOWTO or FAQ on how to define such a scenario.

ie (command lines for printing options via cups.)


The man pages do not have very good "examples" that would be beneficial..

as it stand the current informix database entry on HP/UX looks as follows:
BuildingID, Quename, PR_COMMAND,
1,ADM hp 1320 PORT, lp -d arladmhp1320 -ovsi7.27,
1,ADM hp 1320 PORTCOMP,lp -d arladmhp1320 -ovsi7.27 -oc,
1,ADM hp 1320 LAND,lp -d arladmhp1320 -ovsi5.45 -olandscape,
1,ADM hp 1320 LANDCOMP,lp -d arladmhp1320 -ovsi5.45 -oc -olandscape,

any ideas, pointers (not just RTFM) or suggestions would be appreciated.
3 REPLIES 3
Ivan Ferreira
Honored Contributor
Solution

Re: Cups Question .... Again....

Try to contact to Rick Garland here in the forum, check this link:

http://forums12.itrc.hp.com/service/forums/questionanswer.do?admit=109447627+1208181947375+28353475&threadId=859530

"I admit it is not the most straightforward of migration but a word to the CUPS developers - have a import/migration path available."

Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
rmueller58
Valued Contributor

Re: Cups Question .... Again....

Thank Ivan,

Hopefully Rick will see the thread. His statement says a lot.

rmueller58
Valued Contributor

Re: Cups Question .... Again....

I have cobbed together some code from a post on rick's thread and have come up with a script that builds the printer.conf to convert from HP/UX queues to CUPS...

I am curious as to how CUPS connects the items in the printers.conf to reference what particular PPD or model script is uses for printing?

The script builds the printer file, I still appear to have an issue because it does not know what model script/ppd to use to filter through.

Any insight appreciated.



##############################################
#!/bin/sh
for qname in `/usr/local/bin/lpm |awk -F: '{print $1}' `
do
echo $qname
for ipaddr in `grep PERIPH= /var/spool/lp/interface/$qname |grep -v MOD
EL |awk -F'=' '{print $2}' `
do
echo $qname $ipaddr
done
done


outfile=$1
if [ -z "$outfile" ]
then
echo "USAGE: hp2cups "
exit 1
else
> $outfile
fi

/usr/sam/lbin/lpmgr | while read printnfo
do
isremote=`echo $printnfo \
| cut -d":" -f3 \
| cut -d"," -f1`
if [ "$isremote" = "yes" ]
then
name=`echo $printnfo | cut -d":" -f1`
remote=`echo $printnfo \
| cut -d":" -f5 \
| awk '{print $3}'`
cat >> $outfile << EOF

Info Created by $USER
DeviceURI socket://$ipaddr:9100
Location
State Idle
Accepting Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0

EOF
fi
done
#########################################