[HPADM] SUMMARY: Cloning printers configured with JetAdmin



Thanks to Bill Hassel, Jeff Lightner and Dan Zucker for the replies.
I followed Bill's suggestion to use simple script below. It works like a
charm.

----------------------
#!/usr/bin/sh

# Find all JetDirect printer names and IP addresses
# and create a remove and add script

QTY=0
JETDIR="/opt/hpnpl/bin"
LPDIR="/etc/lp/interface"

for PRN in $(grep ^PERIPH= $LPDIR/*)
do
QUEUE=$(basename $(echo $PRN | cut -d: -f1))
IP=$(echo $PRN | cut -d= -f2)
$JETDIR/removequeue -q $QUEUE
$JETDIR/addqueue -q $QUEUE -h $IP
Done
-----------------------


Regards,
Edi


-----Original Message-----
From: Bill Hassell [mailto:bill@xxxxxxxxxxxxxxx]
Sent: Friday, December 08, 2006 9:04 PM
To: 'Edi CAHYADI'
Subject: RE: [HPADM] Cloning printers configured with JetAdmin

JetAdmin was obsolete and deprecated in 1999 because of Y2K issues.
No one should be running JetAdmin. The new product is not called
JetAdmin, but is called HPPI (HP Printer Installer) which is what
you have on your 11.11 system. DO NOT create a link between the
two directories.

Your 11.00 system must be updated to HPPI. Get a copy from:


http://h20000.www2.hp.com/bizsupport/TechSupport/DriverDownload.jsp?locale=e
n_US&pnameOID=18922&taskId=135&prodTypeId=18972&prodSeriesId=27349&lang=en&c
c=us

(sorry for the ugly URL...)

Install it on you 11.00 system and you'll have HPPI (which is the
name of the interactive menu. Uninstall JetAdmin using swremove.
Make a list of all your printers by name and IP. The names of all
your network printers can be obtained by this simple script:

-------------------------------------------------------------

#!/usr/bin/sh
set -u
export PATH=/usr/bin

# Find all JetDirect printer names and IP addresses
# and create a remove and add script

QTY=0

LPDIR="/etc/lp/interface"
JETDIR="/opt/hpnpl"

for PRN in $(grep ^PERIPH= $LPDIR/*)
do
QUEUE=$(basename $(echo $PRN | cut -d: -f1))
IP=$(echo $PRN | cut -d= -f2)
echo "$$JETDIR/removequeue -q $QUEUE"
echo "$JETDIR/addqueue -q $QUEUE -h $IP"
let QTY=$TY+1
done

echo "# $QTY JetDirect printers found"

-------------------------------------------------------------

The output of this script is a series of commands which
will convert all your 11.00 jetadmin printers to HPPI
printers (actually, it just replaces the two scripts with
the correct ones). You can use the same script on your 11.11
system.


Bill








-----Original Message-----
From: hpux-admin-owner@xxxxxxxxxxxxx
[mailto:hpux-admin-owner@xxxxxxxxxxxxx] On Behalf Of Edi CAHYADI
Sent: Friday, December 08, 2006 4:56 AM
To: hpux-admin@xxxxxxxxxxxxx
Subject: [HPADM] Cloning printers configured with JetAdmin


Hi All,#!/usr/bin/sh

# Find all JetDirect printer names and IP addresses
# and create a remove and add script

QTY=0
JETDIR="/opt/hpnpl/bin"
LPDIR="/etc/lp/interface"


for PRN in $(grep ^PERIPH= $LPDIR/*)
do
QUEUE=$(basename $(echo $PRN | cut -d: -f1))
IP=$(echo $PRN | cut -d= -f2)
echo "$JETDIR/removequeue -q $QUEUE"
echo "$JETDIR/addqueue -q $QUEUE -h $IP"
done

I have 2 servers running 11.00 and 11.11. The 11.00 has
JetAdmin D.06.21 intalled, whereas the 11.11 one has
JetDirect E.10.34.
For the migration, I have cloned the printer config on the
old server with the new one. But some printers don't seem to
work on the new server. Obviously it's because JetAdmin's
installation directory is /opt/hpnp, whereas JetDirect's is
/opt/hpnpl.
Question: Do I have to install JetAdmin on the new server
(not a good choice), or creating a link /opt/hpnp ->
/opt/hpnpl will solve the problem?

Regards,
Edi


--
---> Please post QUESTIONS and SUMMARIES only!! <---
To subscribe/unsubscribe to this list, contact
majordomo@xxxxxxxxxxxxx
Name: hpux-admin@xxxxxxxxxxxxx Owner:
owner-hpux-admin@xxxxxxxxxxxxx

Archives: ftp.dutchworks.nl:/pub/digests/hpux-admin
(FTP, browse only)
http://www.dutchworks.nl/htbin/hpsysadmin (Web,
browse & search)





--
---> Please post QUESTIONS and SUMMARIES only!! <---
To subscribe/unsubscribe to this list, contact majordomo@xxxxxxxxxxxxx
Name: hpux-admin@xxxxxxxxxxxxx Owner: owner-hpux-admin@xxxxxxxxxxxxx

Archives: ftp.dutchworks.nl:/pub/digests/hpux-admin (FTP, browse only)
http://www.dutchworks.nl/htbin/hpsysadmin (Web, browse & search)



Relevant Pages

  • Re: Domain Logon Script Advice
    ... users printers and network shares based upon which Active Directory OU ... I happy with deploying the script via GPO etc, ... A very basic VBScript logon script to map the same printer and shares to all ...
    (microsoft.public.scripting.wsh)
  • Re: Re: Running an OU policy only after a previous OU policy com
    ... > Printers with .vbs logon scripts because regular users don't ... In the Computer Configuration ... > Script and in the User Configuration I put the Same as a Logon ...
    (microsoft.public.win2000.group_policy)
  • Printer question
    ... This question is not as much the content within a script, ... What is the best way to assign default printers with the following conditions. ... Thin clients using Citrix. ... OU and assigning a GPO to the container, however Thin clients are not in ADS. ...
    (microsoft.public.scripting.vbscript)
  • Removing Network Printers - Two Quick Questions Please
    ... when I remove a printer via the logon script it works - the first time - just fine. ... possible to remove all printers that are homed on one server? ... objNet.AddWindowsPrinterConnection strPrinter1 ...
    (microsoft.public.scripting.vbscript)
  • Re: script to map network and default printers
    ... there are three printers showing in the Printers applet of Control ... The script found all three configured as local. ... I placed the script in the logon under group policy where I mapped ...
    (microsoft.public.scripting.vbscript)