#!/bin/sh
#
# $FreeBSD: ports/graphics/sane-backends/files/saned.in,v 1.1 2010/02/07 20:34:20 bms Exp $
#
# PROVIDE: saned
# REQUIRE: netif routing mountcritlocal
# BEFORE:  NETWORKING
#
# A sample saned startup script.
#
# Add the following line to /etc/rc.conf to enable saned:
#	saned_enable="YES"
#

. /etc/rc.subr

name="saned"
rcvar=`set_rcvar`
command="/usr/local/sbin/${name}"

start_precmd=${name}_prestart

saned_prestart()
{
	case "${saned_flags}" in
	*-a\ *) err "saned_flags includes the -a option. Please use saned_uid instead." ;;
	esac
}

load_rc_config $name

: ${saned_enable="NO"}
: ${saned_uid="saned"}

command_args="-a $saned_uid"

run_rc_command "$1"
