summaryrefslogtreecommitdiff
path: root/graphics/sane-backends/files/saned.in
blob: 48dbfca7825f5333af39941746b1cd0182f27285 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh

# PROVIDE: saned
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following line to /etc/rc.conf[.local] to enable saned:
#	saned_enable="YES"

. /etc/rc.subr

name=saned
rcvar=saned_enable

load_rc_config saned

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

command="%%PREFIX%%/sbin/saned"

start_precmd=saned_prestart

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

command_args="-a $saned_uid"

run_rc_command "$1"