Sync usage with man page.
[netbsd-mini2440.git] / etc / rc.d / btattach
blob28d64e01eadde38c85976ccc3d6fa33d74e2d0d2
1 #!/bin/sh
3 # $NetBSD: btattach$
6 # PROVIDE: btattach
7 # REQUIRE: DAEMON
8 # BEFORE: bluetooth
10 $_rc_subr_loaded . /etc/rc.subr
12 name="btattach"
13 rcvar=${name}
14 required_files="/etc/bluetooth/btattach.conf"
15 start_cmd="btattach_start"
16 stop_cmd="btattach_stop"
18 btattach_start()
21 while read type tty speed flags; do
22 case ${type} in
23 \#*|"")
24 continue
26 esac
28 /usr/sbin/btattach ${flags} ${type} ${tty} ${speed}
29 done < /etc/bluetooth/btattach.conf
32 btattach_stop()
35 pids="$(check_process btattach)"
36 if [ -n "${pids}" ]; then
37 for pid in ${pids}; do
38 kill $sig_stop $pid
39 done
43 load_rc_config ${name}
44 run_rc_command "$1"