#!/bin/bash
#
# Startup script for sane
#
# chkconfig: 345 50 50
# description: This script creates the lockdir for sane-backends

SANE_LOCKDIR="/var/lock/sane"

start () {
  echo -n "Creating SANE lock directory: "
  mkdir -m 775 -p $SANE_LOCKDIR && chgrp usb $SANE_LOCKDIR
  if [ $? == 0 ]; then
    echo -e $RESULT_OK
  else
    echo -e $RESULT_FAIL
  fi
}  

stop () {
   echo -n "Removing SANE lock directory: "
   rm -rf $SANE_LOCKDIR
   echo -e $RESULT_OK
}

restart () {
  stop
  start
}

. /lib/lsb/init-functions
