aboutsummaryrefslogtreecommitdiff
path: root/graphics/sane-backends/files/saned.in
diff options
context:
space:
mode:
authorBruce M Simpson <bms@FreeBSD.org>2010-02-07 20:34:20 +0000
committerBruce M Simpson <bms@FreeBSD.org>2010-02-07 20:34:20 +0000
commite8f6999c1b3eea007da83a6e4388deb0e3bf03fb (patch)
treea62cfc6bce657b426d86d5694ed89685d5734b53 /graphics/sane-backends/files/saned.in
parent2f886f4efb083c9c04e0436f4f685170949d67af (diff)
downloadports-e8f6999c1b3eea007da83a6e4388deb0e3bf03fb.tar.gz
ports-e8f6999c1b3eea007da83a6e4388deb0e3bf03fb.zip
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)
Notes
Notes: svn path=/head/; revision=249398
Diffstat (limited to 'graphics/sane-backends/files/saned.in')
-rw-r--r--graphics/sane-backends/files/saned.in37
1 files changed, 37 insertions, 0 deletions
diff --git a/graphics/sane-backends/files/saned.in b/graphics/sane-backends/files/saned.in
new file mode 100644
index 000000000000..ae4345a58a05
--- /dev/null
+++ b/graphics/sane-backends/files/saned.in
@@ -0,0 +1,37 @@
+#!/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"