Blob


1 #!/usr/local/plan9/bin/rc
2 if (! ~ $DEBUG '') { flag x + }
3 if (test -e /net/tcp/clone) {
4 dialstring=`{ndb/query sys $1 dom}
5 network=tcp
6 if (~ $#dialstring 0 || ! ~ $dialstring '') {
7 dialstring=$1
8 }
9 if(lpsend $network^!^$dialstring^!printer) exit ''
10 rv='tcp failed'
11 }
12 if not rv='no tcp'
15 if (! ~ $dialstring '')
16 exit 'lpsend: no dialstring'
17 if not
18 exit 'lpsend: '^$rv