aboutsummaryrefslogtreecommitdiff
path: root/lp/spooler/lpdspool
diff options
context:
space:
mode:
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]
+ }
+}