aboutsummaryrefslogtreecommitdiff
path: root/lp/spooler/lpdspool
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/spooler/lpdspool
parent9f1d53a09bdd8f99e9f81a344c7fa6b5161e1359 (diff)
downloadplan9port-6174642093bdcef4116ae78dbdf4f2e608494258.tar.gz
plan9port-6174642093bdcef4116ae78dbdf4f2e608494258.tar.bz2
plan9port-6174642093bdcef4116ae78dbdf4f2e608494258.zip
Initial lp.
Diffstat (limited to 'lp/spooler/lpdspool')
-rwxr-xr-xlp/spooler/lpdspool15
1 files changed, 15 insertions, 0 deletions
diff --git a/lp/spooler/lpdspool b/lp/spooler/lpdspool
new file mode 100755
index 00000000..3f14eaed
--- /dev/null
+++ b/lp/spooler/lpdspool
@@ -0,0 +1,15 @@
+#!/usr/local/plan9/bin/rc
+
+if (! ~ $DEBUG '') flag x +
+
+if (~ $#* 0) *=''
+
+for (j in $*) {
+ if (~ $j '' || test -f $j) {
+ lpinput $j lpsub process $LPPROC |
+ lpdsend -d$OUTDEV -tf -H$LPMACHID -P$LPUSERID $DEST_HOST >[2]$LPLOGDIR/$LPDEST^.st
+ }
+ if not {
+ echo $j cannot be opened >[1=2]
+ }
+}