Create a script to do it... Here is one way.
Save that as addprinters.sh, and give it execute permissions. chmod u+x addprinters.sh
Now when you want to add multiple printers, do the following:
add each of the printers into the /etc/hosts file (queue name + IP address)
edit prt.add and paste the queue name(s) in there.
finally, run the addprinters.sh script. It will add all of the printers in there, one at a time, all in one go.
As you said you want this done on 4 nodes, that would complicate this script a little, and you'd have to add in extra functionality.
So you could instead create a file and enter in the new info (for importation into the /etc/hosts file) which contains the queue names and IP address. Then just add that into the /etc/hosts file like so. (cat mynewprinters.txt >> /etc/hosts)
Then add this to your script to run before the 'for prt in $PRT' line. To put on the other nodes, simply scp (Secure Copy) the files (prt.add and mynewprinters.txt) to the other nodes, and then run the script on each node (assuming they have the updated addprinters.sh script there already, otherwise, scp that file over to). You could use ssh keys on each server to accomplish this task.
Hopefully I didn't muddy the waters too much now.
PS. You could use rsync to auto-update all the other nodes at the same time too!
Last edited by Scott; 02-25-2011 at 02:41 PM..
Reason: Removed formatting, added code tags
I have setup a printer and queue using SMIT and I have set the default tray to 4. What I am trying to find out is if there is a way to set the next tray it trys to use if tray 4 is empty to tray 3, then tray 2, then tray 1. (0 Replies)
Hello
I created a print queue on my AIX 5 server. Unfortunetly, I already had a print queue with that name, so now I have 2 printers connected to one print queue.
I see the option in smit to add another printer to a queue, but I do not see how to remove one. Anyone know the secret??
... (3 Replies)
Hello,
Under Linux (Cups) you can place an interface driver in:
/etc/cups/interfaces
.. which allows you to intercept printouts to a certain printer and then carry on with the printer.
Is there a similar function under AIX?
Thanks, (0 Replies)
AIX Printers need to be moved to another system
Guy's
We have two servers old AIX 5.2 and new AIX 6.1
the old server has more than 300 printers installed with different configurations
I'd like to move all the printers from the old server to the new server with fast steps
it's... (1 Reply)
Hi
I have around 1000+ java file under different folder in /home/raxit/source and in each file i want to add a fix method.
--------
/*
Some comment for few lines
like header block etc..
*/
package
import
class A {
method1 ()
{
}
method2 () (3 Replies)
Good day UNIX forum, could you help me with my clear printer queue script, i have problems with the consistency of this function, sometimes it works sometimes it doesn't. Thanks in advance
}
preRemovePrintQ(){
clear;
echo;
echo... (1 Reply)
I am trying to print from Aix 6.1 using a remote queue to a Brother 7360N
All in one, I can see the printer, but only output is blank pages. My smit setup is:
Name of queue: testprt
Hostname if Remote Printer: testprt (I added name to etc/hosts)
Name of queue on remote printer: testprt (I... (4 Replies)
Hi
When I add a print queue in my AIX server I get the below message.
enq: (WARNING): 0781-162 Cannot awaken qdaemon (request accepted anyway).
enq: errno = 2: A file or directory in the path name does not exist.
Added print queue 'CUNE024'.
Also when I give a test print the status... (3 Replies)
I am running an old IBM P-Series server running AIX 4.3 (I know a dinosaur). The OS has not been updated.
We had a hard drive failure last weekend, and I was able to get most of the system back up, however, I have 3 line printers and 3 label printers that I can not get working. I have tried... (2 Replies)