aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/lp/lpsend.rc
blob: 74806cded52fd18e6b544b1aa4f1ebf7cb88abc0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/rc
if (! ~ $DEBUG '') { flag x + }
if (test -e /net/tcp/clone) {
	dialstring=`{ndb/query sys $1 dom}
	network=tcp
	if (~ $#dialstring 0 || ! ~ $dialstring '') {
		dialstring=$1
	}
	if(lpsend $network^!^$dialstring^!printer) exit ''
	rv='tcp failed'
}
if not rv='no tcp'


if (! ~ $dialstring '')
	exit 'lpsend: no dialstring'
if not
	exit 'lpsend: '^$rv