From: | "William Hubbs (williamh)" <williamh@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-x86 commit in net-misc/badvpn/files: badvpn-server.init badvpn-ncd.init |
Date: | Thu, 23 Aug 2012 01:37:31 |
Message-Id: | 20120823013721.C76AA203DC@flycatcher.gentoo.org |
1 | williamh 12/08/23 01:37:21 |
2 | |
3 | Modified: badvpn-server.init badvpn-ncd.init |
4 | Log: |
5 | rev bump to fix init scripts for stable OpenRC users. |
6 | |
7 | (Portage version: 2.2.0_alpha121/cvs/Linux i686) |
8 | |
9 | Revision Changes Path |
10 | 1.3 net-misc/badvpn/files/badvpn-server.init |
11 | |
12 | file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/badvpn/files/badvpn-server.init?rev=1.3&view=markup |
13 | plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/badvpn/files/badvpn-server.init?rev=1.3&content-type=text/plain |
14 | diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/badvpn/files/badvpn-server.init?r1=1.2&r2=1.3 |
15 | |
16 | Index: badvpn-server.init |
17 | =================================================================== |
18 | RCS file: /var/cvsroot/gentoo-x86/net-misc/badvpn/files/badvpn-server.init,v |
19 | retrieving revision 1.2 |
20 | retrieving revision 1.3 |
21 | diff -u -r1.2 -r1.3 |
22 | --- badvpn-server.init 19 Aug 2012 13:23:21 -0000 1.2 |
23 | +++ badvpn-server.init 23 Aug 2012 01:37:21 -0000 1.3 |
24 | @@ -21,3 +21,25 @@ |
25 | --syslog-ident \"${vpn_syslog_ident:-${RC_SVCNAME}}\"" |
26 | fi |
27 | } |
28 | + |
29 | +start() |
30 | +{ |
31 | + [ -n "$command" ] || return 0 |
32 | + local _background= |
33 | + ebegin "Starting ${name:-$RC_SVCNAME}" |
34 | + if yesno "${command_background}"; then |
35 | + if [ -z "${pidfile}" ]; then |
36 | + eend 1 "command_background option used but no pidfile specified" |
37 | + return 1 |
38 | + fi |
39 | + _background="--background --make-pidfile" |
40 | + fi |
41 | + eval start-stop-daemon --start \ |
42 | + --exec $command \ |
43 | + ${procname:+--name} $procname \ |
44 | + ${pidfile:+--pidfile} $pidfile \ |
45 | + $_background $start_stop_daemon_args \ |
46 | + -- $command_args |
47 | + eend $? "Failed to start $RC_SVCNAME" |
48 | + return $? |
49 | +} |
50 | |
51 | |
52 | |
53 | 1.3 net-misc/badvpn/files/badvpn-ncd.init |
54 | |
55 | file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/badvpn/files/badvpn-ncd.init?rev=1.3&view=markup |
56 | plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/badvpn/files/badvpn-ncd.init?rev=1.3&content-type=text/plain |
57 | diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/badvpn/files/badvpn-ncd.init?r1=1.2&r2=1.3 |
58 | |
59 | Index: badvpn-ncd.init |
60 | =================================================================== |
61 | RCS file: /var/cvsroot/gentoo-x86/net-misc/badvpn/files/badvpn-ncd.init,v |
62 | retrieving revision 1.2 |
63 | retrieving revision 1.3 |
64 | diff -u -r1.2 -r1.3 |
65 | --- badvpn-ncd.init 19 Aug 2012 13:23:21 -0000 1.2 |
66 | +++ badvpn-ncd.init 23 Aug 2012 01:37:21 -0000 1.3 |
67 | @@ -21,3 +21,25 @@ |
68 | --syslog-ident \"${ncd_syslog_ident:-${RC_SVCNAME}}\"" |
69 | fi |
70 | } |
71 | + |
72 | +start() |
73 | +{ |
74 | + [ -n "$command" ] || return 0 |
75 | + local _background= |
76 | + ebegin "Starting ${name:-$RC_SVCNAME}" |
77 | + if yesno "${command_background}"; then |
78 | + if [ -z "${pidfile}" ]; then |
79 | + eend 1 "command_background option used but no pidfile specified" |
80 | + return 1 |
81 | + fi |
82 | + _background="--background --make-pidfile" |
83 | + fi |
84 | + eval start-stop-daemon --start \ |
85 | + --exec $command \ |
86 | + ${procname:+--name} $procname \ |
87 | + ${pidfile:+--pidfile} $pidfile \ |
88 | + $_background $start_stop_daemon_args \ |
89 | + -- $command_args |
90 | + eend $? "Failed to start $RC_SVCNAME" |
91 | + return $? |
92 | +} |