2013年5月3日 星期五

busybox V1.19.4 lpd can’t start

busybox v1.19.4 lpd help messages show as under
   1: nas1203> lpd --help
   2: BusyBox v1.19.4 (2013-03-28 18:28:43 CST) multi-call binary.   3:  
   4: Usage: lpd SPOOLDIR [HELPER [ARGS]]   5:  
   6: SPOOLDIR must contain (symlinks to) device nodes or directories
   7: with names matching print queue names. In the first case, jobs are
   8: sent directly to the device. Otherwise each job is stored in queue
   9: directory and HELPER program is called. Name of file to print
  10: is passed in $DATAFILE variable.
  11: Example:
  12:         tcpsvd -E 0 515 softlimit -m 999999 lpd /var/spool ./print
it told us to use
tcpsvd -E 0 515 softlimit -m 999999 lpd /var/spool ./print
However the command is not correct.
Because tcpsvd command don’t have softlimit and –m parameter.

Change to :
tcpsvd -E 0 515 lpd /var/spool ./print
And make a director named with printer queue name like lp0 in /var/spool
mkdir /var/spool/lp0
chmod 1777 /var/spool/lp0
And don’t forget to add shell file to /var/spool/lp0 named print
   1: #!/bin/sh
   2: cat ./"$DATAFILE" >/dev/lp0
   3: rm -f ./"$DATAFILE"
chmod 555 /var/spool/lp0/print

沒有留言: