blob: 688a296d77f13215af179e280e4cce5af97bda58 (
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
34
35
36
37
38
39
40
41
42
|
#!/bin/sh
# $FreeBSD$
#
# PROVIDE: dsbdriverd
# REQUIRE: devd
# BEFORE: netwait
# KEYWORD: shutdown
#
# Add these lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# dsbdriverd_enable (bool): Set to NO by default.
# Set it to YES to enable dsbdriverd.
# dsbdriverd_flags (str): Flags passed to dsbdriverd on startup.
# Default is "".
# dsbdriverd_exclude (str): Space separated list of kernel modules (without
# .ko extension) to excluded from loading.
# Default is "".
. /etc/rc.subr
name=dsbdriverd
desc="automatically try to load the suitable driver for your PCI and USB hardware"
rcvar=dsbdriverd_enable
pidfile="/var/run/dsbdriverd.pid"
command="%%PREFIX%%/libexec/dsbdriverd"
start_cmd="${name}_start"
load_rc_config $name
: ${dsbdriverd_enable:="NO"}
dsbdriverd_start() {
if [ -n "$dsbdriverd_exclude" ]; then
dsbdriverd_flags="-x $(echo $dsbdriverd_exclude |
sed -E 's/[ ]+/,/g')"
fi
echo "Starting ${name}."
${command} $dsbdriverd_flags
}
run_rc_command "$1"
|