Operating System - Tru64 Unix
1753428 Members
4864 Online
108793 Solutions
New Discussion юеВ

Re: Copying Printer Definitions on Tru64

 
SOLVED
Go to solution
Mike Miller_8
Regular Advisor

Copying Printer Definitions on Tru64

I need to copy the printer definitions from several Tru64 servers to several other (new) Tru64 servers.

What is the easiest way to do this ?
What are a few good references (examples) ?

Thanks.

= Mike =
4 REPLIES 4
Johan Brusche
Honored Contributor

Re: Copying Printer Definitions on Tru64


For BSD printing you need to copy /etc/printcap and for each printer-name create a spooling directory with that name in /usr/spool.

Then use "lpc check", and it will tell you if you forgot something.

JB.

_JB_
Ralf Puchner
Honored Contributor

Re: Copying Printer Definitions on Tru64

supported way:
# lprsetup

or via sysman station.
Help() { FirstReadManual(urgently); Go_to_it;; }
Mohamed  K Ahmed
Trusted Contributor

Re: Copying Printer Definitions on Tru64

It is better to do it through lprsetup then add the printers with their parameters, then you have to add entries for the printers' IP addresses in /etc/hosts file if they are on the network (TCPIP), add entry for the printer services and port in /etc/services if they are connected to the network (TCPIP), then you have to add spool directories for each printer in /var/spool.
Make directories for spooling as follows

# mkdir lpdn (n is the printer's number)
# chmod 775 lpdn
# chown daemon lpdn
# chgrp daemon lpdn

If you need further assisstance, let me know

HTH
Mohamed
Abdul Rahiman
Esteemed Contributor
Solution

Re: Copying Printer Definitions on Tru64

Mike,

I have been in the same situation before and had to migrate so many (talking about 100s) of printers making it virtually impossible to use the 'lprsetup' command. Here is what I did, I merged the /etc/hosts (most printers were network printers) file from the source to the one on target server as well as the /etc/printcap file.

Then I ran the following script to configure the spool directories.. check this out..
#!/bin/ksh

# Notes for creating printer support files and directories
c=0
cat /etc/printcap |grep "|" > printer_list.dat

for i in `cut -f1 -d "|" printer_list.dat`
do
echo $i
c=`expr $c + 1`
k=`echo $i | cut -f 2 -d 'p'`
touch /usr/adm/${i}err
chown daemon:daemon /usr/adm/${i}err
mkdir /var/spool/lpd${k}
chown daemon:daemon /var/spool/lpd${k}
done
echo ""
echo "Created the spool directories for $c printers"

Hope this helps,
regds,
Abdul Rahman.
No unix, no fun