From: | "Thomas Sachau (tommy)" <tommy@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-x86 commit in net-p2p/fms/files: fms |
Date: | Wed, 31 Mar 2010 19:19:30 |
Message-Id: | E1Nx3Rn-0006c4-NN@stork.gentoo.org |
1 | tommy 10/03/31 19:19:27 |
2 | |
3 | Modified: fms |
4 | Log: |
5 | Apply changes from bug 273138 |
6 | (Portage version: 2.2_rc67-r3/cvs/Linux x86_64) |
7 | |
8 | Revision Changes Path |
9 | 1.4 net-p2p/fms/files/fms |
10 | |
11 | file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-p2p/fms/files/fms?rev=1.4&view=markup |
12 | plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-p2p/fms/files/fms?rev=1.4&content-type=text/plain |
13 | diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-p2p/fms/files/fms?r1=1.3&r2=1.4 |
14 | |
15 | Index: fms |
16 | =================================================================== |
17 | RCS file: /var/cvsroot/gentoo-x86/net-p2p/fms/files/fms,v |
18 | retrieving revision 1.3 |
19 | retrieving revision 1.4 |
20 | diff -u -r1.3 -r1.4 |
21 | --- fms 12 Feb 2009 18:07:25 -0000 1.3 |
22 | +++ fms 31 Mar 2010 19:19:27 -0000 1.4 |
23 | @@ -1,11 +1,16 @@ |
24 | #!/sbin/runscript |
25 | # Copyright 1999-2008 Gentoo Foundation |
26 | # Distributed under the terms of the GNU General Public License v2 |
27 | -# $Header: /var/cvsroot/gentoo-x86/net-p2p/fms/files/fms,v 1.3 2009/02/12 18:07:25 tommy Exp $ |
28 | +# $Header: /var/cvsroot/gentoo-x86/net-p2p/fms/files/fms,v 1.4 2010/03/31 19:19:27 tommy Exp $ |
29 | + |
30 | +# Check for OpenRC/Baselayout 2 - see bug #270646 |
31 | +is_openrc() { |
32 | + [ -f /lib/librc.so -o -f /etc/init.d/sysfs -o -f /lib/rc/version ] |
33 | +} |
34 | |
35 | start() { |
36 | ebegin "Starting FMS" |
37 | - if [[ -f /etc/init.d/sysfs ]]; then |
38 | + if is_openrc; then |
39 | start-stop-daemon -S -u freenet:freenet -d /var/freenet/fms -b -x /usr/bin/fms |
40 | eend $? |
41 | else |
42 | @@ -17,7 +22,7 @@ |
43 | |
44 | stop() { |
45 | ebegin "Stopping FMS" |
46 | - if [[ -f /etc/init.d/sysfs ]]; then |
47 | + if is_openrc; then |
48 | start-stop-daemon -K -u freenet:freenet -d /var/freenet/fms /usr/bin/fms |
49 | eend $? |
50 | else |