Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!sun-barr!apple!motcsd!hpda!hpcuhb!hp-ses!wunder From: wunder@hp-ses.SDE.HP.COM (Walter Underwood) Newsgroups: comp.sys.hp Subject: Re: Experience sought with large HP 9000 clusters Message-ID: <920030@hp-ses.SDE.HP.COM> Date: 23 Jun 89 21:12:28 GMT References: <3517@cps3xx.UUCP> Organization: HP SW Engineering Systems - Palo Alto, CA Lines: 119 wunder sez: It is fairly easy to put spooled devices on cnodes. And here is the script we use. We let the usual model script write to the FIFO. The FIFOs live in /usr/spool/lp/devices. wunder # This is a shell archive. Remove anything before this line, # then unpack it by saving it in a file and typing "sh file". # # Wrapped by Walter Underwood on Fri Jun 23 14:06:30 1989 # # This archive contains: # shuttle # unset LANG echo x - shuttle cat >shuttle <<'@EOF' #! /bin/ksh ################################################################################ # # File: shuttle.sh # RCS: $Header: shuttle.sh,v 1.1 88/04/18 17:01:48 tw Exp $ # Description: Allow printers on cnodes other than the one with lpsched # Author: Tw Cook, HP Software Development Environments # Created: Mon Apr 18 15:43:53 1988 # Modified: Tue May 3 09:21:59 1988 (Scott Kaplan) scott@hpsdel # Language: ksh # Package: N/A # Status: Experimental (Do Not Distribute) # # (c) Copyright 1988, Hewlett-Packard Company, all rights reserved. # ################################################################################ # Usage: shuttle fifo device # # "fifo" is the name of a fifo which must be visible (i.e. not hidden inside # a CDF directory like /dev) to both the machine running lpsched and the # machine with the printer. The fifo will be created if it isn't already # present. This script will block until a file appears in the fifo; then # it will cat the file onto the printer, then it will block again. On the # system running lpsched, simply install the printer as normal with the # fifo name as the device name. On the machine with the printer, run # this script always (perhaps with a "respawn" from init). Set the baud # rate below if different from 19200. ################################################################################ baudRate=9600 if [ "${1}" = "-b" ] then baudRate=${2} shift ; shift fi if [ $# -ne 2 ] then print Usage: ${0} fifo-name printer-name fi myName=${0} fifoName=${1} printerName=${2} { if tty -s <&1 then thisIsTty=1 else thisIsTty=0 fi function ttySet { if (( $thisIstty )) then stty ignpar ixon cs8 ${baudRate} -opost <&1 2>/dev/null fi } function abortMsg { print "${myName}: printer fifo daemon on `hostname` killed.\n" date print "\f" ttySet exit 1 } ttySet trap abortMsg 1 2 3 15 if [ ! -d "`dirname ${fifoName}`" ] then mkdir `dirname ${fifoName}` || \ { print "Cannot make parent directory for fifo, ${fifoName}"; exit 2; } fi if [ ! -p ${fifoName} ] then rm -f ${fifoName} mknod ${fifoName} p # chmod 600 ${fifoName} # permission, ownership? fi while (( 1 )) do cat ${fifoName} ttySet # does this really force output flush? done } > ${printerName} @EOF chmod 755 shuttle exit 0