#!/bin/rc bind -b /sys/lib/lp/bin/$cputype /bin if (! ~ $DEBUG '') { flag x + } # tcp file transfer is broken on plan 9. philw thinks its a flow control problem # with plan 9 streams. if (test -e /net/tcp/clone || import musca /net/tcp) { dialstring=`{ndb/query sys $1 dom} network=tcp if (! ~ $dialstring '') { if(lpsend $dialstring $network printer) exit '' rv='tcp failed' } } if not rv='no tcp' # try not to use tcpgate for a while. 9201021250 # tcp file transfer still broken. 9201171404 # dialstring=`{sed -n '/name=tcp!/s/name=tcp!\([^`]*\).*/\1'$1'/p' /rc/bin/m/$1} # network=tcpgate # if (! ~ $dialstring '') { # if(lpsend $dialstring $network printer) exit '' # rv='tcpgate failed' # } if (test -e /net/dk/clone || import helix /net/dk) { dialstring=`{ndb/query sys $1 dk} network=dk if (! ~ $dialstring '') { if(lpsend $dialstring $network printer) exit '' } rv=$rv^', dk failed' } if not rv=$rv^', no dk' if (! ~ $dialstring '') exit 'lpsend: no dialstring' if not exit 'lpsend: '^$rv