#!/bin/sh /etc/rc.common

START=99

start() {
	res=`cat /proc/bus/usb/devices |grep 'Driver=usblp'`
  	if [ "$res" != "" ]; then
  		chmod 777 /dev/lp0
  		[ ! -d /var/spool ]&& mkdir /var/spool 2>/dev/null
  		[ ! -d /var/spool/lpd ]&& mkdir /var/spool/lpd 2>/dev/null
  		[ ! -d /var/spool/lpd/p1 ]&& mkdir /var/spool/lpd/p1 2>/dev/null
  	        chmod 777 -R /var/spool
  		/usr/sbin/lpd
  	fi
}

