From: | "Alon Bar-Lev (alonbl)" <alonbl@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-x86 commit in net-wireless/bluez/files: rfcomm-init.d-r2 rfcomm-init.d-r1 |
Date: | Thu, 26 Jun 2014 17:19:28 |
Message-Id: | 20140626171843.D11B02004F@flycatcher.gentoo.org |
1 | alonbl 14/06/26 17:18:43 |
2 | |
3 | Added: rfcomm-init.d-r2 |
4 | Removed: rfcomm-init.d-r1 |
5 | Log: |
6 | Re-add rfcomm init.d, bug#505786 |
7 | |
8 | (Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key BF20DC51) |
9 | |
10 | Revision Changes Path |
11 | 1.1 net-wireless/bluez/files/rfcomm-init.d-r2 |
12 | |
13 | file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/bluez/files/rfcomm-init.d-r2?rev=1.1&view=markup |
14 | plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/bluez/files/rfcomm-init.d-r2?rev=1.1&content-type=text/plain |
15 | |
16 | Index: rfcomm-init.d-r2 |
17 | =================================================================== |
18 | #!/sbin/runscript |
19 | # Copyright 1999-2014 Gentoo Foundation |
20 | # Distributed under the terms of the GNU General Public License v2 |
21 | # $Header: /var/cvsroot/gentoo-x86/net-wireless/bluez/files/rfcomm-init.d-r2,v 1.1 2014/06/26 17:18:43 alonbl Exp $ |
22 | |
23 | depend() { |
24 | need bluetooth |
25 | } |
26 | |
27 | checkconfig() { |
28 | if [ -z "${ADDRESS}" ]; then |
29 | eerror "ADDRESS must be set" |
30 | return 1 |
31 | fi |
32 | |
33 | return 0 |
34 | } |
35 | |
36 | start() { |
37 | local DEVICE=${RC_SVCNAME#*.} |
38 | |
39 | checkconfig || return 1 |
40 | |
41 | ebegin "Starting ${RC_SVCNAME}" |
42 | rfcomm bind "${DEVICE}" "${ADDRESS}" ${CHANNEL} |
43 | eend $? |
44 | } |
45 | |
46 | stop() { |
47 | local DEVICE=${RC_SVCNAME#*.} |
48 | |
49 | ebegin "Shutting down ${RC_SVCNAME}" |
50 | rfcomm release "${DEVICE}" |
51 | eend $? |
52 | } |