Operating System - HP-UX
1752767 Members
5538 Online
108789 Solutions
New Discussion

Re: How to install multiple printers via hppi

 
Arumugavel_P
Occasional Advisor

How to install multiple printers via hppi

Hi,

 

Considering the time consume, i want you guys to help me out on how can I install the multiple printers via hppi. These printers are file printers and using dumbplot model script. Every timeI have to run hppi and select all sub options to complete the installation of  a single printer.

 If there is a shell script or giving all printer names in single "hppi" execution, will save a lot of time.

 

Could you please make a way out if you have any regarding this.

 

Thanks in advance!

 

Regards,

Vel

4 REPLIES 4
Matti_Kurkela
Honored Contributor

Re: How to install multiple printers via hppi

There is a command "addqueue" that comes with the hppi package. It does the same job as the printer installation mode of hppi, but takes all its parameters as command line options, so it can easily be scripted.

 

See "man addqueue".

 

There is also a "multiaddqueue" command that can add multiple queues with a single command line.

 

See "man multiaddqueue".

 

MK
Bill Hassell
Honored Contributor

Re: How to install multiple printers via hppi

As Matti mentioned, addqueue (and the more combersome multiaddqueue) will do the job. The addqueue (and others) command is located in /opt/hpnpl/bin but should be in your $PATH. Here is an example:

 

addqueue -h 1.2.3.4 -i 9990 -q prn24 -r off -t off -b off
addqueue -h 2.3.4.5 -i 9990 -q prn24 -r off -t off -b off
addqueue -h 3.4.5.6 -i 9990 -q prn24 -r off -t off -b off

 -h is the IP address. I prefer IP because getting DNS updated for printers can be difficult. The IP should never change. If the printer is moved to a new subnet, just use removequeue and add the printer back again with the new IP address.

 

-i 9990 is the dumbplot ID number. Use addqueue -l (that's lowercase L) to see the list of printers.

 

-q is the HP-UX name (queue name) for the printer.

 

-q, -t should always be off, and -b turns off the banner page.



Bill Hassell, sysadmin
Arumugavel_P
Occasional Advisor

Re: How to install multiple printers via hppi

Thanks both of you!

 

I just want to know, will addqueue do the ping check to the ip address (-h). The reason is, here I am installing file printers (virtual), which is not physical machine.

 

So I can give only the name, by  which I will call my printer.

 

Thanks,

 

Vel

 

Matti_Kurkela
Honored Contributor

Re: How to install multiple printers via hppi

If you use the -i option to specify the printer type, the addqueue command will not check connectivity to the printer: it will just add the queue exactly as specified. if you omit the -i option, the command will need to connect to the printer to identify its type.

 

However, hppi/addqueue is not designed for creating file printers: the network printing mode generates a rather complicated model script for the queue. Using the basic "lpadmin" command to create a remote printer queue would create a simpler model script which would probably be easier to modify into a file printer.

 

 

As far as I've understood, the "local" printers were the original operating mode of the HP-UX print spooler: the print job was piped through the model script by the spooler, and then passed to a local device.

 

The spooler was then extended to work with printers attached to other Unix systems by adding a "remote" print mode: in this mode, the device is specified as /dev/null in the spooler configuration, and the model script sends a copy of the print job to the remote Unix system for printing, as a "side effect". (The spooler would still send another copy of the job to /dev/null, as it was originally programmed to do.)

 

Since the remote Unix system was expected to be able to run model scripts, there was no need to modify the print job at the originating host, so the "remote model" scripts could be relatively simple.

 

When JetDirect was invented, the same scheme was used, but now it was necessary to merge the functionality of a normal printer model script and a JetDirect version of a "remote model" script. This is what hppi/addqueue does, and the result is some rather complicated scripts in /etc/lp/*.

 

If you want to create file printers, you might want to remove the useless complexity and use the "remote" model as a basis for your file printers instead. If you are good at scripting, you might even write your own "file model" scripts, and add them to /var/adm/lp, effectively creating a new printer type.

MK