]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - etc/rc.d/ubthidhci
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / etc / rc.d / ubthidhci
1 #!/bin/sh
2 #
3 # $FreeBSD$
4 #
5
6 # PROVIDE: ubthidhci
7 # REQUIRE: DAEMON
8 # BEFORE: bluetooth
9 # KEYWORD: nojail shutdown
10
11 . /etc/rc.subr
12
13 name="ubthidhci"
14 rcvar="ubthidhci_enable"
15 command="/usr/sbin/usbconfig"
16 start_precmd="ubthidhci_prestart"
17
18 ubthidhci_prestart()
19 {
20
21         if [ -z ${ubthidhci_busnum} ]; then
22                 warn ubthidhci_busnum is not set
23                 return 1
24         fi
25         if [ -z ${ubthidhci_addr} ]; then
26                 warn ubthidhci_addr is not set
27                 return 1
28         fi
29 }
30
31 load_rc_config $name
32 #
33 # We discard the output because:
34 # 1) we don't want it to show up during boot; and
35 # 2) the request usually returns an error, but that doesn't mean it failed
36 #
37 # NB: 0x40 is UT_VENDOR
38 command_args="-u ${ubthidhci_busnum} -a ${ubthidhci_addr} do_request 0x40 0 0 0 0 > /dev/null 2>&1"
39
40 run_rc_command "$1"