1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-27 05:10:36 +00:00
freebsd-ports/graphics/sane-backends/files/saned.in
Bruce M Simpson e8f6999c1b Add an RC script for saned, and borrow machinery for creating
a dedicated sandbox user account from the nullmailer port.

Also add a pkg-message which describes how to tie down a USB
scanner to this sandbox using devd(8) in FreeBSD 8, as well as
describing what config files likely need editing.
Note: This text probably belongs in the FreeBSD Handbook.

Bump PORTREVISION.

Reviewed by:	dougb (with edits to saned.in)
2010-02-07 20:34:20 +00:00

38 lines
594 B
Bash

#!/bin/sh
#
# $FreeBSD$
#
# 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="%%PREFIX%%/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"