From: | "Peter Volkov (pva)" <pva@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-x86 commit in net-analyzer/darkstat/files: darkstat-confd.new digest-darkstat-3.0.707-r1 darkstat-init.new |
Date: | Sat, 03 Nov 2007 17:33:34 |
Message-Id: | E1IoMsB-000887-E0@stork.gentoo.org |
1 | pva 07/11/03 17:33:27 |
2 | |
3 | Added: darkstat-confd.new digest-darkstat-3.0.707-r1 |
4 | darkstat-init.new |
5 | Log: |
6 | Fixes init script and ebuild cleanups. Fixes bug #194650, thank Tiger <marchaldoneway AT hotmail.fr> for report and help. |
7 | (Portage version: 2.1.3.16) |
8 | |
9 | Revision Changes Path |
10 | 1.1 net-analyzer/darkstat/files/darkstat-confd.new |
11 | |
12 | file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/darkstat/files/darkstat-confd.new?rev=1.1&view=markup |
13 | plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/darkstat/files/darkstat-confd.new?rev=1.1&content-type=text/plain |
14 | |
15 | Index: darkstat-confd.new |
16 | =================================================================== |
17 | # The interface to listen on |
18 | # Use only with /etc/init.d/darkstat init script. If you use |
19 | # /etc/init.d/darkstat.if init script, then this option should be ignored. |
20 | #INTERFACE="eth0" |
21 | |
22 | # The port for the embedded webserver |
23 | #PORT="667" |
24 | |
25 | # The address embedded webserver should bind to |
26 | #ADDRESS="0.0.0.0" |
27 | |
28 | # Set the filter. See tcpdump documenation for details. |
29 | #FILTER="" |
30 | |
31 | # Log daily traffic statistics into the named file, relative to the |
32 | # chroot directory (see, below). |
33 | #DAYLOGFILE="darkstat.log" |
34 | |
35 | # Other options: |
36 | DARKSTAT_OPTS="--no-promisc --no-dns --user darkstat" |
37 | |
38 | # The directory to which the program chroots after initialization. |
39 | # If you change this, please note the variable below and adjust |
40 | # the permissions accordingly. Note that if you want to use the |
41 | # --daylog option in EXTRAOPTS, the files are logged relative |
42 | # to the chroot-directory; see the man-page for details. |
43 | #CHROOT=__CHROOT__ |
44 | |
45 | |
46 | |
47 | 1.1 net-analyzer/darkstat/files/digest-darkstat-3.0.707-r1 |
48 | |
49 | file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/darkstat/files/digest-darkstat-3.0.707-r1?rev=1.1&view=markup |
50 | plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/darkstat/files/digest-darkstat-3.0.707-r1?rev=1.1&content-type=text/plain |
51 | |
52 | Index: digest-darkstat-3.0.707-r1 |
53 | =================================================================== |
54 | MD5 91c70f96498dd679b21330214361e4dc darkstat-3.0.707.tar.bz2 90459 |
55 | RMD160 91a19ef837a58f6b464cc24c4dc34bcb8ef15a59 darkstat-3.0.707.tar.bz2 90459 |
56 | SHA256 243bd77f93acbb6832f5ef1cc4b03abe823006c129f88fe5724697e1c0857644 darkstat-3.0.707.tar.bz2 90459 |
57 | |
58 | |
59 | |
60 | 1.1 net-analyzer/darkstat/files/darkstat-init.new |
61 | |
62 | file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/darkstat/files/darkstat-init.new?rev=1.1&view=markup |
63 | plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/darkstat/files/darkstat-init.new?rev=1.1&content-type=text/plain |
64 | |
65 | Index: darkstat-init.new |
66 | =================================================================== |
67 | #!/sbin/runscript |
68 | # Copyright 1999-2006 Gentoo Foundation |
69 | # Distributed under the terms of the GNU General Public License v2 |
70 | # $Header: /var/cvsroot/gentoo-x86/net-analyzer/darkstat/files/darkstat-init.new,v 1.1 2007/11/03 17:33:26 pva Exp $ |
71 | |
72 | IF=${SVCNAME##*.} |
73 | |
74 | if [ -n "${IF}" -a "${SVCNAME}" != "darkstat" ] ; then |
75 | PIDFILE=/var/run/darkstat.${IF}.pid |
76 | else |
77 | PIDFILE=/var/run/darkstat.pid |
78 | fi |
79 | |
80 | depend() { |
81 | need net |
82 | } |
83 | |
84 | chkconfig() { |
85 | if [ -n "${IF}" -a "${SVCNAME}" != "darkstat" ] ; then |
86 | if [ ! -f "/etc/conf.d/darkstat.${IF}" ] ; then |
87 | einfo "It's possible to have distinct config in /etc/conf.d/darkstat.${IF}." |
88 | fi |
89 | INTERFACE=${IF} |
90 | else |
91 | if [ ! -f "/etc/conf.d/darkstat" ] ; then |
92 | ewarn "/etc/conf.d/darkstat does not exist. Falling on defaults." |
93 | fi |
94 | fi |
95 | |
96 | if [ -z "${INTERFACE}" ]; then |
97 | ewarn "No interface specified. Trying to use eth0." |
98 | INTERFACE="eth0" |
99 | fi |
100 | |
101 | DARK_OPTS="-i ${INTERFACE}" |
102 | [ -n "${PORT}" ] && DARK_OPTS="${DARK_OPTS} -p ${PORT}" |
103 | [ -n "${ADDRESS}" ] && DARK_OPTS="${DARK_OPTS} -b ${ADDRESS}" |
104 | [ -n "${DAYLOGFILE}" ] && DARK_OPTS="${DARK_OPTS} --daylog ${DAYLOGFILE}" |
105 | |
106 | return 0 |
107 | } |
108 | |
109 | start() { |
110 | chkconfig || return 1 |
111 | |
112 | # If ${PIDFILE} exist darkstat fails to start |
113 | [ -f ${PIDFILE} ] && rm ${PIDFILE} |
114 | ebegin "Starting darkstat on ${INTERFACE}" |
115 | /sbin/start-stop-daemon --start --exec /usr/sbin/darkstat -- \ |
116 | --chroot "${CHROOT:-__CHROOT__}" --pidfile ${PIDFILE} \ |
117 | ${DARKSTAT_OPTS} ${DARK_OPTS} -f "${FILTER}" |
118 | eend $? |
119 | } |
120 | |
121 | stop() { |
122 | ebegin "Stopping darkstat on ${INTERFACE}" |
123 | /sbin/start-stop-daemon --stop --pidfile ${PIDFILE} |
124 | eend $? |
125 | } |
126 | |
127 | |
128 | |
129 | -- |
130 | gentoo-commits@g.o mailing list |