Operating System - HP-UX
1753467 Members
5110 Online
108794 Solutions
New Discussion юеВ

Re: script to create printer in jetadmin

 
SOLVED
Go to solution
Donna Yedziniak
Occasional Contributor

script to create printer in jetadmin

I have about 100 jetdirect printers to install on 3 N-class servers. Does anyone have a script they have created to complete this task?
We are using the jetdirect Printer Installer vE.10.18.

Thanks,
Donna Yedziniak
4 REPLIES 4
herman anker
Occasional Contributor
Solution

Re: script to create printer in jetadmin

Should be possible to run in the same matter as an automated ftp script:

ftp_put()
{
ftp -nv << EOF
prompt
open $1
user $2 $3
put $4
bye
EOF
}
Rita C Workman
Honored Contributor

Re: script to create printer in jetadmin

Take a look at this thread...there were a few good suggestions and scripts attached:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0x99fca12d6d27d5118fef0090279cd0f9,00.html

Rita
Donna Yedziniak
Occasional Contributor

Re: script to create printer in jetadmin

Thanks Herman and Rita - I'll give your suggestions a try!

Thanks,
Donna
Bill Hassell
Honored Contributor

Re: script to create printer in jetadmin

Actually, it is infinitely easier to add hundreds of printers to HP-UX by using the addqueue feature of JetDirect software. Load the latest version onto the 3 servers (download the JetDirect Printer Installer from HP's website).

Then for the list of printers, run addqueue to add each one. For a scripted method, create a data file with the IP addr followed by the desired queue-name. Then run this script:

#!/usr/bin/sh
# specify the datafile name as first param
cat $1 | while read IPADDR QUEUENAME
do
/opt/hpnp/bin/addqueue -h $IPADDR -q $QUEUENAME
done

Note that each printer must be powered on, connected to the network and have a reachable IP address configured as addqueue queries each printer as to model to pick the correct printer script. The lp spooler will be stopped and started for each addqueue command.

In cases where the printer is not yet connected or powered on, you can use addqueue -l to list the printer ID numbers then use addqueue with the -i option to specify the printer model and addqueue will add the printer even though it is not reachable. There will be a short timeout as addqueue tries to reach the printer. Without the -i option, the printer must be online or addqueue will report that it could not contact the printer.


Bill Hassell, sysadmin