Subject: printing from BSD to Solaris

From: [email-masked] ("g.cameron")
Date: Fri, 24 Sep 93 13:25:00 BST

In article [email-masked], [email-masked] (Jeroen Nijhof) writes:
>How can I print from BSD-machine to a Sun running Solaris 2.2?
>the BSD-machine at the moment is 'waiting for xxx to wake up'
>
>One thing seems fishy to me, `/usr/sbin/lpsystem -A' answers
>00020203000000000000000000000000: I cannot recognize the TCP/IP
>address in this.
>
>(The question is in the Solaris2-FAQ, but unfortunately it's answer is
>`you're on your own'.)

Hope I'm doing the right thing in posting this, as I'm very far from
being an expert in this area. This is the shell script I put together
from reading the manuals, and it did seem to do the job OK. You may
need to use

	% pmadm -r -p tcp -s lp

(and the same for lpd) if you already have it set up.

Anyway - here's my script ..

#!/bin/sh

export PATH
PATH=/bin:/usr/bin:/usr/ucb:/usr/sbin

echo "Setting up print server ..."
echo ""
sacadm -a -p tcp -t listen -c "/usr/lib/saf/listen tcp" -v `nlsadmin -V` -n 9999
sacadm -l

HEAD="`lpsystem -A | dd bs=4 count=1 2> /dev/null`"
TAIL="`lpsystem -A | dd bs=8 skip=1 2> /dev/null`"

ADDR="${HEAD}0203${TAIL}"
MODADDR="${HEAD}0ACE${TAIL}"

pmadm -a -p tcp -s lp  -i root -m `nlsadmin -o /var/spool/lp/fifos/listenS5` -v `nlsadmin -V`
pmadm -a -p tcp -s lpd -i root -m `nlsadmin -o /var/spool/lp/fifos/listenBSD -A "\x${ADDR}"` -v `nlsadmin -V`
pmadm -a -p tcp -s 0   -i root -m `nlsadmin -c /usr/lib/saf/nlps_server -A "\x${MODADDR}"` -v `nlsadmin -V`

echo ""
echo "Checking log messages ..."
echo ""
cat /var/saf/tcp/log
echo ""
echo "Done."

 ---------------------------------------------------------------------------
 George Cameron			 [email-masked]
 Dept. BioMedical Physics
 Aberdeen University
 Foresterhill			 Fax:		+44 (0)224-685645
 Aberdeen AB9 2ZD		 Telephone:	+44 (0)224-681818 ext 53195