<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Moving Printers. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/moving-printers/m-p/4979797#M419601</link>
    <description>The code I listed will produce a ready-to-use  script that looks something like this:&lt;BR /&gt; &lt;BR /&gt;/opt/hpnpl/bin/addqueue -h 12.34.56.78 -q lj4bay6&lt;BR /&gt; &lt;BR /&gt;and so on. The documents listed above are used for a complete move--no editing. This would be necessary if oyu had a mix of local, remote and JetDirect printers. But since all your printers are JetDirect, the task is much simpler and you can edit the rsultant file before you add the printers to the new system.</description>
    <pubDate>Thu, 18 May 2006 19:56:01 GMT</pubDate>
    <dc:creator>Bill Hassell</dc:creator>
    <dc:date>2006-05-18T19:56:01Z</dc:date>
    <item>
      <title>Moving Printers.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/moving-printers/m-p/4979791#M419595</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I have 311 printers to define on severs A, B, and C.  The printers needing to be defined are already setup on an existing server,D.  The problem I have is that I don't need to define ALL printers from server D to A,B, and C, just the specified 311.  How would I accomplish this?  Is it even possible?</description>
      <pubDate>Thu, 18 May 2006 14:13:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/moving-printers/m-p/4979791#M419595</guid>
      <dc:creator>Patrick Ware_1</dc:creator>
      <dc:date>2006-05-18T14:13:34Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Printers.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/moving-printers/m-p/4979792#M419596</link>
      <description>By the way, these printers were added using jetadmin/jetdirect.</description>
      <pubDate>Thu, 18 May 2006 14:14:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/moving-printers/m-p/4979792#M419596</guid>
      <dc:creator>Patrick Ware_1</dc:creator>
      <dc:date>2006-05-18T14:14:49Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Printers.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/moving-printers/m-p/4979793#M419597</link>
      <description>Actually very easy with JetDirect printers. The command is addqueue and found in the same directory as hppi (or if you are using the obsolete jetadmin /opt/hpnp/bin). Start by making a list of the printers and their IP or hostname:&lt;BR /&gt;&lt;BR /&gt;JETDIR=/opt/hpnpl &lt;BR /&gt;for MYPRN in /etc/lp/interface&lt;BR /&gt;do&lt;BR /&gt;MYHOSTIP=$(grep PERIPH= $MYPRN)&lt;BR /&gt;if [ $? -eq 0 ] &lt;BR /&gt;then&lt;BR /&gt;echo "$JETDIR/bin/addqueue -h $MYHOSTIP -q $MYPRN"&lt;BR /&gt;fi&lt;BR /&gt;done&lt;BR /&gt; &lt;BR /&gt;If you do not have the hpnpl directory, change the first line to /opt/hpnp. The output of the above script contains the command line needed to add the printer on a new server. Just edit out the undesired printers and copy the resultant file to the new server.</description>
      <pubDate>Thu, 18 May 2006 15:29:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/moving-printers/m-p/4979793#M419597</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2006-05-18T15:29:07Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Printers.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/moving-printers/m-p/4979794#M419598</link>
      <description>Patrick,&lt;BR /&gt;&lt;BR /&gt;I did this few months ago to move about 105 printers from (11.11) to 11.23&lt;BR /&gt;&lt;BR /&gt;so far now problems.&lt;BR /&gt;How to move all printers to another server DocId: KBRC00017466   Updated: 12/14/05 9:57:00 AM &lt;BR /&gt;&lt;BR /&gt;PROBLEM&lt;BR /&gt;How to move all printers to another server?&lt;BR /&gt;RESOLUTION&lt;BR /&gt;HP does not support the copying of the lp spooler configuration from one system&lt;BR /&gt;to another. The following suggestions have been known to work in many cases.&lt;BR /&gt;&lt;BR /&gt;If possible use SAM to create a backup of your printer configuration that&lt;BR /&gt;can be restored on another system, see document:&lt;BR /&gt;UPRTKBRC00014862 How to move the lp spooler configuration to another system&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;If SAM fails the spooler directories can be copied between systems of the&lt;BR /&gt;same OS version. If you have JetDirect network printers attached, ensure both&lt;BR /&gt;servers have JetDirect Printer Installer software installed.&lt;BR /&gt;&lt;BR /&gt;On the source server, backup using tar, these directories:&lt;BR /&gt;&lt;BR /&gt;     /etc/lp/&lt;BR /&gt;     /var/spool/lp&lt;BR /&gt;&lt;BR /&gt;Example:&lt;BR /&gt;&lt;BR /&gt;     # lpshut&lt;BR /&gt;     # tar cvf /tmp/etc_lp /etc/lp/*&lt;BR /&gt;     # tar cvf /tmp/var_spool_lp /var/spool/lp/*&lt;BR /&gt;     # lpsched&lt;BR /&gt;&lt;BR /&gt;Use ftp in binary mode to copy the following files to your destination&lt;BR /&gt;server:&lt;BR /&gt;&lt;BR /&gt;     /tmp/etc_lp&lt;BR /&gt;     /tmp/var_spool_lp&lt;BR /&gt;&lt;BR /&gt;On the destination server, restore those directories after removing any&lt;BR /&gt;previous printer configurations:&lt;BR /&gt;&lt;BR /&gt;     # lpshut&lt;BR /&gt;     # rm -r /etc/lp&lt;BR /&gt;     # rm -r /var/spool/lp&lt;BR /&gt;     # tar xvf /tmp/etc_lp&lt;BR /&gt;     # tar xvf /tmp/var_spool_lp&lt;BR /&gt;     # lpsched&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 18 May 2006 15:51:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/moving-printers/m-p/4979794#M419598</guid>
      <dc:creator>Basheer_2</dc:creator>
      <dc:date>2006-05-18T15:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Printers.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/moving-printers/m-p/4979795#M419599</link>
      <description>Patrick,&lt;BR /&gt;&lt;BR /&gt;This is the Doc, HP Sent Me&lt;BR /&gt;and this is the one, I followed&lt;BR /&gt;UPRTKBRC00014862               &lt;BR /&gt;How to move the lp spooler configuration to another system &lt;BR /&gt;Document Information Table &lt;BR /&gt;How to move the lp spooler configuration to another system DocId: UPRTKBRC00014862   Updated: 12/1/04 7:44:00 AM &lt;BR /&gt;&lt;BR /&gt;PROBLEM&lt;BR /&gt;How can the lp spooler configuration be moved or copied to another&lt;BR /&gt;system? Recreating each printer in the current configuration on the new system&lt;BR /&gt;requires a lot of effort..&lt;BR /&gt;&lt;BR /&gt;RESOLUTION&lt;BR /&gt;HP does not support the copying of the lp spooler configuration from one system&lt;BR /&gt;to another. The IO configuration of the target system may be different than IO&lt;BR /&gt;configuration on the source system. The device files for local printers would&lt;BR /&gt;be different on the new system, and the spooler configuration for those&lt;BR /&gt;printers contain the device files. The print queues may not work.&lt;BR /&gt;&lt;BR /&gt;A procedure that has been known to work in most circumstances is as follows :&lt;BR /&gt;&lt;BR /&gt;On the source system:&lt;BR /&gt;&lt;BR /&gt;Execute&lt;BR /&gt;-&amp;gt; SAM&lt;BR /&gt;-&amp;gt; Printers and Plotters&lt;BR /&gt;-&amp;gt; Lp Spooler&lt;BR /&gt;-&amp;gt; Save/Restore Spooler Configuration&lt;BR /&gt;&lt;BR /&gt;Choose&lt;BR /&gt;-&amp;gt; Actions&lt;BR /&gt;-&amp;gt; Save Spooler Configuration&lt;BR /&gt;&lt;BR /&gt;This will save all the information necessary to rebuild the spooler into the&lt;BR /&gt;directory /var/sam/lp.&lt;BR /&gt;&lt;BR /&gt;Tar this directory (/var/sam/lp) :&lt;BR /&gt;&lt;BR /&gt;# tar cvf /tmp/lp.tar /var/sam/lp&lt;BR /&gt;&lt;BR /&gt;Copy the resulting tar file, lp.tar, onto the target system.&lt;BR /&gt;&lt;BR /&gt;Unpack the lp.tar file on the target system :&lt;BR /&gt;&lt;BR /&gt;# tar xvf lp.tar&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Execute&lt;BR /&gt;-&amp;gt; SAM&lt;BR /&gt;-&amp;gt; Printers and Plotters&lt;BR /&gt;-&amp;gt; Lp Spooler&lt;BR /&gt;-&amp;gt; Save/Restore Spooler Configuration&lt;BR /&gt;&lt;BR /&gt;Choose&lt;BR /&gt;-&amp;gt; Actions&lt;BR /&gt;-&amp;gt; Restore Spooler Configuration&lt;BR /&gt;&lt;BR /&gt;This will build the lp spooler configuration on the target system using the&lt;BR /&gt;information from the source system, creating a "clone" of the old system.&lt;BR /&gt;&lt;BR /&gt;If any source system print queues are network printers originally configured&lt;BR /&gt;using HP JetAdmin or HP JetDirect Printer Installer, then the&lt;BR /&gt;following must also be performed.&lt;BR /&gt;&lt;BR /&gt;HP JetDirect Printer Installer must be installed on the destination&lt;BR /&gt;system.&lt;BR /&gt;&lt;BR /&gt;Run the following command after restoring the printer/spooler&lt;BR /&gt;configuration through SAM:&lt;BR /&gt;&lt;BR /&gt;# /opt/hpnpl/bin/transferqueue local&lt;BR /&gt;Enter the queue name or all to modify all the queues : all&lt;BR /&gt;&lt;BR /&gt;NOTE: transferqueue changes several paths in the JetAdmin model scripts in&lt;BR /&gt;/etc/lp/interface/ and /etc/lp/interface/model.orig/ to point to the location&lt;BR /&gt;of the HP JetDirect Printer Installer product.&lt;BR /&gt;&lt;BR /&gt;An error may occur when restoring the spooler if the root umask is set to&lt;BR /&gt;something other than 022. The permission on /var/sam/lp and all file&lt;BR /&gt;under it could be changed from their defaults, with the result that SAM cannot&lt;BR /&gt;access the files to perform the restore. The permissions on /var/sam/lp and the&lt;BR /&gt;files under it should be 755 or rwxr-xr-x, with the owner root and group&lt;BR /&gt;sys.&lt;BR /&gt;&lt;BR /&gt;# ll -d /var/sam/lp&lt;BR /&gt;drwxr-xr-x   8 root       sys         8192 Nov 29 15:45 /var/sam/lp&lt;BR /&gt;&lt;BR /&gt;The error received in SAMlog would be something like:&lt;BR /&gt;&lt;BR /&gt;ERROR A problem occurred doing&lt;BR /&gt;"lpadmin -ptrec_stor -i/var/sam/lp/interface/trec_st or -v/dev/null ".&lt;BR /&gt;&lt;BR /&gt;Stderr from this command is&lt;BR /&gt;"/usr/sbin/lpadmin: can't access file "/var/sam/lp/interface/trec_stor"".&lt;BR /&gt;&lt;BR /&gt;* Failed to restore trec_stor.&lt;BR /&gt;&lt;BR /&gt;Another error that may occur, and has the same root problem, is:&lt;BR /&gt;&lt;BR /&gt;ERROR A problem occurred doing&lt;BR /&gt;"lpadmin -pPRINTER -i/var/sam/lp/interface/PRINTER -v/dev/null ".&lt;BR /&gt;&lt;BR /&gt;Stderr from this command is&lt;BR /&gt;"/usr/sbin/lpadmin: can't access file /var/sam/lp/interface/PRINTER"&lt;BR /&gt;&lt;BR /&gt;* Failed to restore PRINTER.&lt;BR /&gt;&lt;BR /&gt;A second way to resolve this particular error is to change the owner and group&lt;BR /&gt;of /var/sam/lp to lp and bin.&lt;BR /&gt;&lt;BR /&gt;chown -R lp:bin /var/sam/lp&lt;BR /&gt;&lt;BR /&gt;A better solution would be to set the proper permissions on the directory and&lt;BR /&gt;files with:&lt;BR /&gt;&lt;BR /&gt;chmod -R 755 /var/sam/lp&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;</description>
      <pubDate>Thu, 18 May 2006 16:26:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/moving-printers/m-p/4979795#M419599</guid>
      <dc:creator>Basheer_2</dc:creator>
      <dc:date>2006-05-18T16:26:56Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Printers.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/moving-printers/m-p/4979796#M419600</link>
      <description>Bill,&lt;BR /&gt;&lt;BR /&gt;How should me list look, or be formated?</description>
      <pubDate>Thu, 18 May 2006 19:50:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/moving-printers/m-p/4979796#M419600</guid>
      <dc:creator>Patrick Ware_1</dc:creator>
      <dc:date>2006-05-18T19:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Printers.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/moving-printers/m-p/4979797#M419601</link>
      <description>The code I listed will produce a ready-to-use  script that looks something like this:&lt;BR /&gt; &lt;BR /&gt;/opt/hpnpl/bin/addqueue -h 12.34.56.78 -q lj4bay6&lt;BR /&gt; &lt;BR /&gt;and so on. The documents listed above are used for a complete move--no editing. This would be necessary if oyu had a mix of local, remote and JetDirect printers. But since all your printers are JetDirect, the task is much simpler and you can edit the rsultant file before you add the printers to the new system.</description>
      <pubDate>Thu, 18 May 2006 19:56:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/moving-printers/m-p/4979797#M419601</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2006-05-18T19:56:01Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Printers.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/moving-printers/m-p/4979798#M419602</link>
      <description>You will have to forgive me, but I am a novice scripter.  I ran the script, and saw no output, and do not know where to look for such.  What am I supposed to see?</description>
      <pubDate>Thu, 18 May 2006 23:17:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/moving-printers/m-p/4979798#M419602</guid>
      <dc:creator>Patrick Ware_1</dc:creator>
      <dc:date>2006-05-18T23:17:45Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Printers.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/moving-printers/m-p/4979799#M419603</link>
      <description>Ok, I added an "else" statement to the script, and now I know why I am not getting any output.&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/ksh&lt;BR /&gt;JETDIR=/opt/hpnp&lt;BR /&gt;for MYPRN in /etc/lp/interface&lt;BR /&gt;do&lt;BR /&gt;MYHOSTIP=$(grep PERIPH= $MYPRN)&lt;BR /&gt; if [ $? -eq 0 ]&lt;BR /&gt;  then&lt;BR /&gt;   echo "$JETDIR/bin/addqueue -h $MYHOSTIP -q $MYPRN"&lt;BR /&gt;  else &lt;BR /&gt;   echo "$JETDIR/bin/addqueue -h $MYHOSTIP -q $MYPRN"&lt;BR /&gt; fi&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;After I run the command, I get the following output:&lt;BR /&gt;&lt;BR /&gt;root@D:/&amp;gt; ./ip_printer.sh          &lt;BR /&gt;/opt/hpnp/bin/addqueue -h  -q /etc/lp/interface&lt;BR /&gt;&lt;BR /&gt;This lets me know that the if statement didn't return with the right code.  I now assume that you were expecting the printer queue names to be the same as what the address defined in the config file in /var/sam/lp/interfaces directory?  Please advise.  I am in a time crunch now.&lt;BR /&gt;</description>
      <pubDate>Thu, 18 May 2006 23:37:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/moving-printers/m-p/4979799#M419603</guid>
      <dc:creator>Patrick Ware_1</dc:creator>
      <dc:date>2006-05-18T23:37:09Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Printers.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/moving-printers/m-p/4979800#M419604</link>
      <description>Ok, &lt;BR /&gt;&lt;BR /&gt;I changed up the script a little to read from a list of the printers that I have:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/ksh&lt;BR /&gt;JETDIR=/opt/hpnp&lt;BR /&gt;for MYPRN in `cat /home/pw3483/tools/printers.txt`&lt;BR /&gt;do&lt;BR /&gt;MYHOSTIP=$(grep PERIPH= /var/sam/lp/interface/$MYPRN)&lt;BR /&gt; if [ $? -eq 0 ]&lt;BR /&gt;  then&lt;BR /&gt;   echo "$JETDIR/bin/addqueue -h $MYHOSTIP -q $MYPRN"&lt;BR /&gt;  else &lt;BR /&gt;   echo "$JETDIR/bin/addqueue -h $MYHOSTIP -q $MYPRN"&lt;BR /&gt; fi&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Here is sample output:&lt;BR /&gt;&lt;BR /&gt;/opt/hpnp/bin/addqueue -h PERIPH=192.168.1.28&lt;BR /&gt;  PERIPH=$MODEL -q wiwiggp02&lt;BR /&gt;&lt;BR /&gt;I can get rid of the first "PERIPH=" easily by doing a search and replace.  The issue I am having now is keeping the PERIPH=$MODEL from showing up in the output at all.  How can I accomplish that?  This is how the output should look:&lt;BR /&gt;&lt;BR /&gt;/opt/hpnp/bin/addqueue -h PERIPH=135.218.204.28 -q wiwiggp02&lt;BR /&gt;&lt;BR /&gt;Please help!!&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 19 May 2006 07:24:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/moving-printers/m-p/4979800#M419604</guid>
      <dc:creator>Patrick Ware_1</dc:creator>
      <dc:date>2006-05-19T07:24:34Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Printers.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/moving-printers/m-p/4979801#M419605</link>
      <description>The directory /etc/lp/interface has a set of printer scripts, each named for the local printer queue. Since you said that all these printers were added using JetDirect software, each queue in that directory will have the variable PERIPH being assigned the IP address or hostname of your printer. My script will produce nothing if the keyword PERIPH is not present. Look at any of the scripts in the interface directory. They should have a header at the top that mentions the Network Printer and the control program hpnpf. If the script contains information about remote printers, then the printers were not added as HP JetDirect printers (in SAM they are called network printers). Post the first 20 lines of one of the printer scripts in /etc/lp/interface.</description>
      <pubDate>Fri, 19 May 2006 07:38:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/moving-printers/m-p/4979801#M419605</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2006-05-19T07:38:20Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Printers.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/moving-printers/m-p/4979802#M419606</link>
      <description>Here is a sample output from one of the printer scripts in /etc/lp/interface:&lt;BR /&gt;&lt;BR /&gt;root@erie:/etc/lp/interface&amp;gt; head -20 4100bl07&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;&lt;BR /&gt;# (c) Copyright 1992, 1993, 1994 Hewlett-Packard Company.  All Rights Reserved.&lt;BR /&gt;&lt;BR /&gt;# $Header: /users/hpnp/odyssey/repository/sh/hpnp.model.psh,v 1.18 1999/04/21 08:40:27 hpnp Exp $&lt;BR /&gt;#&lt;BR /&gt;# HP JetAdmin Utility for Unix, HP-UX Network Printer Control Script&lt;BR /&gt;#&lt;BR /&gt;# This script invokes the original model script from the &lt;BR /&gt;# subdirectory model.orig and pipes its output to hpnpf.&lt;BR /&gt;&lt;BR /&gt;if echo $PATH | grep "/usr/bin" &amp;gt; /dev/null 2&amp;gt;&amp;amp;1&lt;BR /&gt;then&lt;BR /&gt;  :&lt;BR /&gt;else&lt;BR /&gt;  PATH=$PATH:/usr/bin&lt;BR /&gt;  export PATH&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;# Add bin to the path for systems with /bin&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;BTW, in my question above this one, how do I keep "PERIPH=$MODEL" from appearing in the output?  I think if I could do that, this problem would be over.</description>
      <pubDate>Fri, 19 May 2006 08:04:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/moving-printers/m-p/4979802#M419606</guid>
      <dc:creator>Patrick Ware_1</dc:creator>
      <dc:date>2006-05-19T08:04:48Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Printers.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/moving-printers/m-p/4979803#M419607</link>
      <description>All the files I have viewed have the PERIPH=address in them.  In both locations (/etc/lp/interface and /var/sam/lp/interface)&lt;BR /&gt;</description>
      <pubDate>Fri, 19 May 2006 09:09:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/moving-printers/m-p/4979803#M419607</guid>
      <dc:creator>Patrick Ware_1</dc:creator>
      <dc:date>2006-05-19T09:09:49Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Printers.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/moving-printers/m-p/4979804#M419608</link>
      <description>I neccessary change from:&lt;BR /&gt;&lt;BR /&gt;MYHOSTIP=$(grep PERIPH= $MYPRN)&lt;BR /&gt;&lt;BR /&gt;to&lt;BR /&gt;&lt;BR /&gt;MYHOSTIP=$(grep PERIPH= $MYPRN | grep -v MODEL)</description>
      <pubDate>Fri, 19 May 2006 09:33:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/moving-printers/m-p/4979804#M419608</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2006-05-19T09:33:30Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Printers.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/moving-printers/m-p/4979805#M419609</link>
      <description>Since you already have the list of printers, all you need is the IP addresses. The script you displayed is indeed a JetDirect script but I don't have access to a system at the moment. Use:&lt;BR /&gt; &lt;BR /&gt;cd /var/sam/lp/interface&lt;BR /&gt;grep MODEL 4100bl07&lt;BR /&gt; &lt;BR /&gt;to locate where MODEL is assigned. All we're doing here is to locate the printer's IP address. Show this item and then I can modify the script to obtain the hostname or IP address. &lt;BR /&gt; &lt;BR /&gt;On the other hand, if you already have the local HP-UX print queues (the printer names) corresponding to either /etc/hosts or your DNS server (so that nslookup 4100bl07 will return an IP address), you have a much simpler task. Let us know.&lt;BR /&gt;</description>
      <pubDate>Fri, 19 May 2006 10:51:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/moving-printers/m-p/4979805#M419609</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2006-05-19T10:51:03Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Printers.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/moving-printers/m-p/4979806#M419610</link>
      <description>OK, I found a system. There are two PERIPH lines in the basic JetDirect model script. They look like this:&lt;BR /&gt; &lt;BR /&gt;PERIPH=myhostORip&lt;BR /&gt;PERIPH=$MODEL&lt;BR /&gt; &lt;BR /&gt;However, the $MODEL line is not in column 1 so my script would be modified to:&lt;BR /&gt; &lt;BR /&gt;JETDIR=/opt/hpnpl&lt;BR /&gt;for MYPRN in /etc/lp/interface&lt;BR /&gt;do&lt;BR /&gt;MYHOSTIP=$(grep ^PERIPH= $MYPRN | cut -d= =f2)&lt;BR /&gt;if [ $? -eq 0 ]&lt;BR /&gt;then&lt;BR /&gt;echo "$JETDIR/bin/addqueue -h $MYHOSTIP -q $MYPRN"&lt;BR /&gt;fi&lt;BR /&gt;done&lt;BR /&gt; &lt;BR /&gt;There are two changes: one is the addition of ^ in front of the PERIPH= string to find only the line which has the IP address or IP assigned. The other is an oversight in the original script. $MYHOSTIP should contain only the text following the = sign so MYHOSTIP= now has a cut command at the end. This should produce a ready-to-use file, something like this:&lt;BR /&gt; &lt;BR /&gt;/opt/hpnpl/bin/addqueue -h 12.34.56.78 -q 4100bl07&lt;BR /&gt;/opt/hpnpl/bin/addqueue -h 12.34.56.6 -q 4102bl08&lt;BR /&gt;/opt/hpnpl/bin/addqueue -h 12.34.56.123 -q 4132bl09&lt;BR /&gt; &lt;BR /&gt;and so on. Just remove the printers you don't want to add from this file, transfer it to the new computer and the run it with: sh myfile&lt;BR /&gt;</description>
      <pubDate>Fri, 19 May 2006 13:12:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/moving-printers/m-p/4979806#M419610</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2006-05-19T13:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Printers.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/moving-printers/m-p/4979807#M419611</link>
      <description>Bill and System Administrator, &lt;BR /&gt;&lt;BR /&gt;Between you two, I got what I needed accomplished!!  Thank you.&lt;BR /&gt;</description>
      <pubDate>Fri, 19 May 2006 13:37:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/moving-printers/m-p/4979807#M419611</guid>
      <dc:creator>Patrick Ware_1</dc:creator>
      <dc:date>2006-05-19T13:37:57Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Printers.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/moving-printers/m-p/4979808#M419612</link>
      <description>Done</description>
      <pubDate>Fri, 26 May 2006 10:47:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/moving-printers/m-p/4979808#M419612</guid>
      <dc:creator>Patrick Ware_1</dc:creator>
      <dc:date>2006-05-26T10:47:36Z</dc:date>
    </item>
  </channel>
</rss>

