printing 4.1 to 2.3

----------

X-Sun-Data-Type: text

X-Sun-Data-Description: text

X-Sun-Data-Name: text

X-Sun-Content-Lines: 46

Thanks to all who replied! This one was a little trickier than it

first appeared.

I was unable to print from SunOS 4.1.3 to Solaris 2.3. I described how

I added references to my new Solaris 2.3 print servers to the printcap

files on my SunOS 4.1.3 machines, and described the resulting errors.

There were 3 symptoms I was aware of:

1) lpstat -o on 4.1.3 machines got "lp: unknown printer <host>" errors, and

2) "waiting for queue to be enabled on <host>" errors

3) print jobs sent to 2.3 machines from 4.1.3 machines never got printed.

Errors (1) and (2) were because I set up the 4.1.3 printcap entry

incorrectly.

        it said :rm=<host>,lp=<printer>:\

        instead of : :rm=<host>,lp=,rp=<printer>:\

Lots of you caught that one! Once I fixed that, the lpstat output

looked OK, except that the jobs still didn't get out of the print

queue as shown on the 4.1.3 machine.

Turns out, and this is well documented on page 463 of the Solaris

System Administration class notes, that one must initialize each 2.3

server to listen at a TCP port for the print requests from the BSD

print clients. I wrote the attached script, then ran it once on each

2.3 print server, and I'm up and running. One minor problem: the

script doesn't handle the case where there's already a tcp listener in

place, and there was, so I had to "sacadm -r -p tcp" before running

it.

Kudus to Eric Stone at Fusion Systems, who was the first one to get

back to me with the right answer.

He also said I needed to do a "lpsystem -t bsd <client_hostname>" for

each 4.1.3 client, on each 2.3 server, but that doesn't appear to be

necessary, since I omitted that step, and am already able to print

without problems. Makes me nervous when things work without the

"necessary" steps, though...

+-----------------------+----------------------------+-----------------+

| Sumner K Hushing III | GENERAL DYNAMICS | This space |

|hushing@gdwest.gd.COM | Space Systems Division | intentionally |

| 619-547-4542 | PO Box 85990, MZ 55-5050 | left blank |

| 619-547-5791 messages | San Diego, CA 92186-5990 | :-) |

+-----------------------+----------------------------+-----------------+

----------

X-Sun-Data-Type: shell-script

X-Sun-Data-Name: lp_init_bsd_listener

X-Sun-Content-Lines: 47

#!/bin/sh

usage() {

echo '

########################################################################

# FILE: lp_init_bsd_listener

#

# PURPOSE: Initialize BSD print request listener

#

# USAGE: lp_init_bsd_listener

#

# PARAMETERS: None.

#

# MODIFICATION HISTORY:

# 94/03/23, SK Hushing III. Original issue.

# Credit to Eric Stone at Fusion Systems.

########################################################################

'

exit

}

if [ "$1" = "help" ]; then usage; fi

#-----[ Display current state ]-----#

echo "CURRENT SACADM AND PMADM STATE:"

sacadm -l

pmadm -l

echo "BE WARY OF ANY EXISTING TCP LISTENER. PROCEED? \c"

read x

case $x in

y|Y)

    ;;

*)

    echo "Aborted."

    exit

    ;;

esac

#-----[ Initialize listener for BSD print requests ]-----#

echo "\nADDING BSD TCP LISTENER\n"

ver=`nlsadmin -V`

addr=`lpsystem -A`

sacadm -a -p tcp -t listen -c "/usr/lib/saf/listen tcp" -v $ver

pmadm -a -p tcp -s lpd -i root -v $ver -m `nlsadmin -o /var/spool/lp/fifos/listenBSD -A "\x$addr"`

#-----[ Display state after adding listener ]-----#

echo "NEW SACADM AND PMADM STATE:"

sacadm -l

pmadm -l

[4215 byte] By [CodeProf.com] at [2007-12-25 8:43:00]