1830898 Members
3207 Online
110017 Solutions
New Discussion

HPPI config files.

 
SOLVED
Go to solution

HPPI config files.

Hi Admins,

I'am about to install 20 printers on 6 new servers and I don't want enter all the names and IP addresses in HPPI on all the servers.

Is there a way to enter the printers once in HPPI on a node and than copy the printer configuration files to the remaining nodes ?

TIA,

Willy Schriemer
5 REPLIES 5
Sachin Patel
Honored Contributor

Re: HPPI config files.

Hi Willy,

Sam will let you do it.

sam - printers &plotters.

But my suggestion is to configure 20 printers in one server and setup these 20 as a remote printer on another 5 servers. This way you will have more centerl control over your printer.

Sachin
Is photography a hobby or another way to spend $
Pete Randall
Outstanding Contributor

Re: HPPI config files.

Willy,

If you follow Sachin's suggestion, you can use a script to add the printers on all the "other" servers. Something like this:

#!/bin/ksh
###############################################################################
# add_printers Script to add remote, lan attached
# printers to a server.
###############################################################################
# shut down the print spooler
#############################
/usr/lib/lpshut
#############################
# for each printer listed , ...
#############################
for PRNTR in `cat /nfs/yukon/usr/local/bin/printer_list`
do
LOC=ORION
LPADMIN="lpadmin -p$PRNTR -v/dev/null -mrmodel -g0 -ocmrcmodel -osmrsmodel -orm$LOC.holstein.com -orp$OPR
NTR"
#############################
# ... do the following
#############################
# 1st - remove it, then add it, using defaults, placing it on NET1
#############################
lpadmin -x$PRNTR
$LPADMIN
#############################
# 2nd - begin accepting requests to it
#############################
/usr/lib/accept $PRNTR
#############################
# 3rd - enable it
#############################
/usr/bin/enable $PRNTR
done
#############################
# after the last printer is added, restart the spooler
#############################
/usr/lib/lpsched



Hope this helps,

Pete

Pete
John Payne_2
Honored Contributor
Solution

Re: HPPI config files.

Willy,

Alternatively, you could write a little script that does the printer adds, and copy it to each box.

The format would be:

/opt/hpnpl/bin/addqueue -h iporhostname -q queuename

/opt/hpnpl/bin/addqueue -h myprinter1.willy.com -q queue1

Add all the printer defines here, then run the script.

(I just thought I'd throw it out there before Bill H. gets on later and does it...)

Hope it helps

John
Spoon!!!!
Bill Hassell
Honored Contributor

Re: HPPI config files.

Thanks John. addqueue is indeed the way to go for the easiest way to add printers. Note that addqueue exists in both the obsolete JetAdmin package as well as HPPI. Since there are only 20 printers, I would just hardcode all the IP and print-queue names into the script. For a larger set of printers, or to generalize the script, you could use a separate config file that has the IP + printqueue names.

Note that addqueue only works with HP's JetDirect LAN interface (internal to printer or the JetDirect External adapter). Many sysadmins are confused with the term 'network printer' as there are several non-HP network printer solutions that are not compatible with HPPI. In those cases, you must add the printer using lpadmin and a bunch of options (or use sam interactively). This includes print servers on PCs or other Unix boxes.


Bill Hassell, sysadmin

Re: HPPI config files.

Hi All,

Thanks for the input. I know it were only 20 printers but a good sysadmin is lazy and if its scripted once you can you is in the future again.

Best regards,

Willy Schriemer
Philips Semiconductors
The Netherlands