Gentoo Archives: gentoo-commits

From: "Chris Gianelloni (wolf31o2)" <wolf31o2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-misc/dnetc/files: dnetc.initd dnetc.confd
Date: Sat, 02 Feb 2008 14:02:44
Message-Id: E1JLIwO-0004pQ-3B@stork.gentoo.org
1 wolf31o2 08/02/02 14:01:56
2
3 Added: dnetc.initd dnetc.confd
4 Log:
5 Version bump with a modified ebuild from Michael Hordijk <hoffbrinkle@×××××××.com> and edited by me. Closing bug #177091.
6 (Portage version: 2.1.4.1)
7
8 Revision Changes Path
9 1.1 app-misc/dnetc/files/dnetc.initd
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-misc/dnetc/files/dnetc.initd?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-misc/dnetc/files/dnetc.initd?rev=1.1&content-type=text/plain
13
14 Index: dnetc.initd
15 ===================================================================
16 #!/sbin/runscript
17 # Copyright 1999-2008 Gentoo Foundation
18 # Distributed under the terms of the GNU General Public License v2
19 # $Header: /var/cvsroot/gentoo-x86/app-misc/dnetc/files/dnetc.initd,v 1.1 2008/02/02 14:01:55 wolf31o2 Exp $
20
21 opts="${opts} reload fetch flush"
22
23 depend() {
24 use net
25 }
26
27 processOpts() {
28 local retVal=1
29
30 DNETPATH="/opt/distributed.net"
31 DNETBIN="${DNETPATH}/dnetc"
32
33 STARTOPTS="--start --chuid dnetc:dnetc --quiet \
34 --exec ${DNETBIN}"
35
36 DNETOPTS="-quiet"
37
38 if [ -e /etc/conf.d/dnetc ] ; then
39 retVal=0
40 DNETOPTS="${DNETOPTS} -ini /etc/conf.d/dnetc"
41 elif [ -e ${DNETPATH}/dnetc.ini ]; then
42 retVal=0
43 DNETOPTS="${DNETOPTS} -ini ${DNETPATH}/dnetc.ini"
44 elif [ ! -z ${EMAIL} ]; then
45 retVal=0
46 fi
47
48 # override ini settings with values in /etc/conf.d/dnetc
49
50 DNETOPTS="${DNETOPTS} ${EMAIL:+-e ${EMAIL}}"
51 if [ ! -z ${BUFFER_BASE_DIR} ] ; then
52 local buff_in="${BUFFER_BASE_DIR:+${BUFFER_BASE_DIR}/}buff-in"
53 local buff_out="${BUFFER_BASE_DIR:+${BUFFER_BASE_DIR}/}buff-out"
54 DNETOPTS="${DNETOPTS} -inbase ${buff_in}"
55 DNETOPTS="${DNETOPTS} -outbase ${buff_out}"
56 fi
57 DNETOPTS="${DNETOPTS} ${KEYSERVER_ADDRESS:+-a ${KEYSERVER_ADDRESS}}"
58
59 if [ ${retVal} -ne 0 ] ; then
60 eerror "Need some sort of configuration. Check /etc/conf.d/dnetc."
61 fi
62
63 return ${retVal}
64 }
65
66 start() {
67 processOpts || return 1
68 ebegin "Starting distributed.net client"
69 start-stop-daemon ${STARTOPTS} -- ${DNETOPTS}
70 eend ${?}
71 }
72
73 stop() {
74 processOpts || return 1
75 ebegin "Stopping distributed.net client"
76 start-stop-daemon --stop --quiet --exec ${DNETBIN} --
77 eend ${?}
78 }
79
80 reload() {
81 processOpts || return 1
82 ebegin "Reloading distributed.net client"
83 start-stop-daemon --stop --quiet --signal HUP --exec ${DNETBIN}
84 eend ${?}
85 }
86
87 fetch() {
88 processOpts || return 1
89 ebegin "Fetching distributed.net client buffers"
90 ${DNETBIN} ${DNETOPTS} -fetch
91 eend ${?}
92 }
93
94 flush() {
95 processOpts || return 1
96 ebegin "Flushing distributed.net client buffers"
97 ${DNETBIN} ${DNETOPTS} -flush
98 eend ${?}
99 }
100
101
102
103 1.1 app-misc/dnetc/files/dnetc.confd
104
105 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-misc/dnetc/files/dnetc.confd?rev=1.1&view=markup
106 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-misc/dnetc/files/dnetc.confd?rev=1.1&content-type=text/plain
107
108 Index: dnetc.confd
109 ===================================================================
110 # configuration file for dnetc
111
112 # Startup will look for configuration files in the following places, using the
113 # first one that it finds:
114 # 1. /etc/dnetc.conf
115 # 2. /opt/distributed.net/dnetc.ini
116
117 # Values specified here will override those found in any client configuration
118 # file.
119
120 # email adress
121 EMAIL=
122
123 # buffer base dir
124 BUFFER_BASE_DIR=/var/spool/dnetc
125
126 # keyserver address
127 KEYSERVER_ADDRESS=
128
129
130
131 --
132 gentoo-commits@l.g.o mailing list