aboutsummaryrefslogtreecommitdiff
path: root/lp/bin/lpsend.rc
diff options
context:
space:
mode:
Diffstat (limited to 'lp/bin/lpsend.rc')
-rwxr-xr-xlp/bin/lpsend.rc18
1 files changed, 18 insertions, 0 deletions
diff --git a/lp/bin/lpsend.rc b/lp/bin/lpsend.rc
new file mode 100755
index 00000000..bf64787c
--- /dev/null
+++ b/lp/bin/lpsend.rc
@@ -0,0 +1,18 @@
+#!/usr/local/plan9/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