1847307 Members
3078 Online
110264 Solutions
New Discussion

Re: JetAdmin HPUX

 
SOLVED
Go to solution
iranzo
Frequent Advisor

JetAdmin HPUX

Hello,
I look for a script to
create 25 printers with same driver
on an HPUX B.11.11 with JetAdmin utility
Version D.06.21 .
Thank's a lot.
Bonjour
2 REPLIES 2
RAC_1
Honored Contributor

Re: JetAdmin HPUX

Man addqueue. You have all required options here.

Anil
There is no substitute to HARDWORK
Geoff Wild
Honored Contributor
Solution

Re: JetAdmin HPUX

Create a list of printers - in aa file called: printer.name.list.out

printer1 ip.addr.XX.XX
printer2 ip.addr.XX.XX

The run the following script (I called it /opt/hpnpl/queue-admin):

#!/bin/sh
# script to add-delete queues
# Geoff Wild
#
if [ $# -lt 1 -o \( $# -gt 1 -a $# -lt 4 \) ]
then
echo "Usage:"
echo "queue-admin \"command\""
echo "Example:"
echo "queue-admin addqueue"
echo "queue-admin removequeue"
exit 1
fi


if [ $1 = "addqueue" ] ; then
exec 0while read line
do
p=`echo ${line}|awk '{print $1}'`
echo "adding queue " ${p}
# 9998 is net_genericprinter Modelscript
$1 -i 9998 -h ${p}.pcacorp.net -q ${p}
done
else
lpshut
exec 0while read line
do
p=`echo ${line}|awk '{print $1}'`
echo "removing queue " ${p}
lpadmin -x${p}
done
lpsched
fi




Make sure /opt/hpnpl/bin is in your path.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.