aboutsummaryrefslogtreecommitdiff
path: root/lp/bin
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2005-08-31 02:15:26 +0000
committerrsc <devnull@localhost>2005-08-31 02:15:26 +0000
commit6174642093bdcef4116ae78dbdf4f2e608494258 (patch)
treeb916d25347295ee15b35434b92011b31fd76862c /lp/bin
parent9f1d53a09bdd8f99e9f81a344c7fa6b5161e1359 (diff)
downloadplan9port-6174642093bdcef4116ae78dbdf4f2e608494258.tar.gz
plan9port-6174642093bdcef4116ae78dbdf4f2e608494258.tar.bz2
plan9port-6174642093bdcef4116ae78dbdf4f2e608494258.zip
Initial lp.
Diffstat (limited to 'lp/bin')
-rw-r--r--lp/bin/.cvsignore0
-rwxr-xr-xlp/bin/UNLOCK3
-rwxr-xr-xlp/bin/lpsend.rc18
3 files changed, 21 insertions, 0 deletions
diff --git a/lp/bin/.cvsignore b/lp/bin/.cvsignore
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/lp/bin/.cvsignore
diff --git a/lp/bin/UNLOCK b/lp/bin/UNLOCK
new file mode 100755
index 00000000..fadddf76
--- /dev/null
+++ b/lp/bin/UNLOCK
@@ -0,0 +1,3 @@
+#!/usr/local/plan9/bin/rc
+
+>$1/LOCK && rm -f $1/LOCK
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