ITEM: DF5946L

Using command line to set up HP jet direct virtual printer


ENV:

************************************************************************
Machine Type(s):   7015_______________________(7013, e.g.                  )
Machine Model(s):  99J_______________________(560, e.g.                   )
Machine Serial(s): 26-02753_______________________(serial number(s)            )
Relevant Hardware: ent0 ent1 Ethernet Adapters
128 port Adapter 16 port RANS
                   _______________________ adapters are configured     )
Disk Space:        20GB Total_____________(total, and available in the )
                   _______________________ filesystems affected; e.g., )
                   _______________________ /var/dce for DCE problem    )
Paging Space:      544MB_______________________(if relevant                 )
Memory:            256MB_______________________(total                       )
Number of Users:   45______________________(total and active if relevant)
Network Environment: EtherNet_____________________(or other special environment)
AIX Level:      3.2.5.1________________________(3.2.4, 3.2.5, 4.1.1, ...    )

DESC:

A few months back I had to set up an HP printer with a jet direct card.
I used smit for this.  The smit path I followed to get to the setup
was;  smit -> spooler -> Manage local queues -> Virtual printers ->
Add a virtual printer -> Option 4 (HP with jet direct)  I then answered
the necessary questions to add the printer.  After the printer was added
I went back in to change certain characteristics (Lines per page,
Rotate Page, Pitch, Line Wrap, and Line Density).  The whole process
was fairly straight forward, though quite lengthy going thru smit.
I now found out I may have to add over 100 more printers like this.
Obviously, I do NOT want to go thru smit to add all of them.  I checked
out smit.script to see what commands were executed when I did this one
printer, but all I found was one line executing /etc/mkvirprt which
I assume got me into the menus.  IS THERE A WAY TO SET UP THIS TYPE
OF PRINTER USING THE COMMAND LINE, SO I COULD AUTOMATE (VIA SCRIPT)
SETTING UP THESE TYPES OF PRINTERS???   Thanks.....

All smit does is run mkvirprt... Unfortunately, mkvirprt does a 
bit more when invoked interactively than it does when called from the
command-line, BUT it is certainly possible to add a print queue, 
queue device, and virtual printer from the command-line.


\# Create a queue in /etc/qconfig
mkque -q $QNAME

\# Create queue device stanza - NOTE the directory 
\# /var/spool/lpd/pio/dev ONLY exists in AIX 3.2.  Replace with
\# /var/spool/lpd/pio/@local/dev in AIX 4
mkquedev -q $QNAME -d $QDEVICE  \\
  -a "backend = /usr/lib/lpd/pio/etc/piojetd $HOSTNAME" \\
  -a "file = /var/spool/lpd/pio/dev/$HOSTNAME"

\# Now create an HP Laserjet IV PCL virtual printer
mkvirprt -d $QDEVICE -n $QNAME -q $QNAME -spcl -thplj-4

\# Now change any default virtual printer attributes you wish to alter
chvirprt -q $QNAME -d $QDEVICE  -a "attribute = value" \\
                                -a "attribute = value" ......


This pseudo-ksh script will create a queue, queue device, and
virtual printer - then you can change any virtual printer attributes
that you wish to change.


Support Line: Using command line to set up HP jet direct virtual printer ITEM: DF5946L
Dated: July 1997 Category: N/A
This HTML file was generated 99/06/24~13:30:16
Comments or suggestions? Contact us