1 |
commit: 00eeaa6f7d079b25e6316e1c07b4772672c78569 |
2 |
Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jul 11 21:03:48 2021 +0000 |
4 |
Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jul 11 21:18:25 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=00eeaa6f |
7 |
|
8 |
net-misc/stargazer: migrate to GLEP 81 |
9 |
|
10 |
Bug: https://bugs.gentoo.org/781440 |
11 |
Package-Manager: Portage-3.0.20, Repoman-3.0.3 |
12 |
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org> |
13 |
|
14 |
net-misc/stargazer/stargazer-2.408-r2.ebuild | 542 +++++++++++++++++++++++++++ |
15 |
1 file changed, 542 insertions(+) |
16 |
|
17 |
diff --git a/net-misc/stargazer/stargazer-2.408-r2.ebuild b/net-misc/stargazer/stargazer-2.408-r2.ebuild |
18 |
new file mode 100644 |
19 |
index 00000000000..7f3667a702e |
20 |
--- /dev/null |
21 |
+++ b/net-misc/stargazer/stargazer-2.408-r2.ebuild |
22 |
@@ -0,0 +1,542 @@ |
23 |
+# Copyright 1999-2021 Gentoo Authors |
24 |
+# Distributed under the terms of the GNU General Public License v2 |
25 |
+ |
26 |
+EAPI=7 |
27 |
+ |
28 |
+PROJECTS="sgconv rlm_stg rscriptd sgauth sgconf sgconf_xml stargazer" |
29 |
+ |
30 |
+STG_MODULES_AUTH="always_online internet_access freeradius" |
31 |
+STG_MODULES_CAPTURE="ipq ether netflow" |
32 |
+STG_MODULES_CONFIG="sgconfig rpcconfig" |
33 |
+STG_MODULES_OTHER="ping smux remote_script" |
34 |
+STG_MODULES_STORE="files firebird mysql postgres" |
35 |
+ |
36 |
+declare -A MODULES |
37 |
+MODULES=( [module_auth_always_online]="authorization\/ao:mod_ao" |
38 |
+ [module_auth_internet_access]="authorization\/inetaccess:mod_ia" |
39 |
+ [module_auth_freeradius]="other\/radius:mod_radius" |
40 |
+ [module_capture_ipq]="capture\/ipq_linux:mod_cap_ipq" |
41 |
+ [module_capture_ether]="capture\/ether_linux:mod_cap_ether" |
42 |
+ [module_capture_netflow]="capture\/cap_nf:mod_cap_nf" |
43 |
+ [module_config_sgconfig]="configuration\/sgconfig:mod_sg" |
44 |
+ [module_config_rpcconfig]="configuration\/rpcconfig:mod_rpc" |
45 |
+ [module_other_ping]="other\/ping:mod_ping" |
46 |
+ [module_other_smux]="other\/smux:mod_smux" |
47 |
+ [module_other_remote_script]="other\/rscript:mod_remote_script" |
48 |
+ [module_store_files]="store\/files:store_files" |
49 |
+ [module_store_firebird]="store\/firebird:store_firebird" |
50 |
+ [module_store_mysql]="store\/mysql:store_mysql" |
51 |
+ [module_store_postgres]="store\/postgresql:store_postgresql" |
52 |
+) |
53 |
+ |
54 |
+declare -A INIT |
55 |
+INIT=( [module_store_files]="11d" |
56 |
+ [module_store_firebird]="11d;s/need net/need net firebird/" |
57 |
+ [module_store_mysql]="11d;s/need net/need net mysql/" |
58 |
+ [module_store_postgres]="11d;s/need net/need net postgresql/" |
59 |
+) |
60 |
+ |
61 |
+MY_P="stg-${PV}" |
62 |
+ |
63 |
+inherit flag-o-matic linux-info |
64 |
+ |
65 |
+DESCRIPTION="Billing system for small home and office networks" |
66 |
+HOMEPAGE="http://stg.dp.ua/" |
67 |
+SRC_URI="http://stg.dp.ua/download/server/${PV}/${MY_P}.tar.gz" |
68 |
+S="${WORKDIR}/${MY_P}" |
69 |
+ |
70 |
+LICENSE="GPL-2" |
71 |
+SLOT="0" |
72 |
+KEYWORDS="~amd64 ~x86" |
73 |
+ |
74 |
+CDEPEND=" |
75 |
+ acct-group/stg |
76 |
+ acct-user/stg |
77 |
+" |
78 |
+ |
79 |
+RDEPEND=" |
80 |
+ module_config_rpcconfig? ( |
81 |
+ dev-libs/expat |
82 |
+ dev-libs/xmlrpc-c[abyss,cxx] |
83 |
+ ) |
84 |
+ module_config_sgconfig? ( dev-libs/expat ) |
85 |
+ module_store_firebird? ( dev-db/firebird ) |
86 |
+ module_store_mysql? ( dev-db/mysql-connector-c:0= ) |
87 |
+ module_store_postgres? ( dev-db/postgresql:= ) |
88 |
+ rscriptd? ( ${CDEPEND} ) |
89 |
+ sgauth? ( ${CDEPEND} ) |
90 |
+ sgconf? ( |
91 |
+ ${CDEPEND} |
92 |
+ dev-libs/expat |
93 |
+ ) |
94 |
+ sgconf_xml? ( dev-libs/expat ) |
95 |
+ stargazer? ( ${CDEPEND} ) |
96 |
+" |
97 |
+ |
98 |
+DEPEND="${RDEPEND}" |
99 |
+ |
100 |
+REQUIRED_USE="stargazer? ( ^^ ( module_store_files module_store_firebird module_store_mysql module_store_postgres ) )" |
101 |
+ |
102 |
+DOCS=( BUGS ../../ChangeLog CHANGES README TODO ) |
103 |
+ |
104 |
+# Patches already in upstream's trunk |
105 |
+PATCHES=( |
106 |
+ # Fix dependency on fbclient for module_store_firebird |
107 |
+ "${FILESDIR}"/patches/stg-2.408-makefile-firebird-upstream.patch |
108 |
+ # Rewrite config for rscriptd |
109 |
+ "${FILESDIR}"/patches/stg-2.408-rscriptd.conf-upstream.patch |
110 |
+ # Rewrite config for sgauth |
111 |
+ "${FILESDIR}"/patches/stg-2.408-sgauth.conf-upstream.patch |
112 |
+ # Standardization of 'On-scripts' |
113 |
+ "${FILESDIR}"/patches/stg-2.408-on-upstream.patch |
114 |
+ # Install demo scripts for rscriptd |
115 |
+ "${FILESDIR}"/patches/stg-2.408-rscriptd-upstream.patch |
116 |
+ # Fix crush on stop |
117 |
+ "${FILESDIR}"/patches/stg-2.408-fix-crash-on-stop.patch |
118 |
+ # Rename convertor to sgconv to avoid possible file name collisions |
119 |
+ "${FILESDIR}"/patches/stg-2.408-sgconv-upstream.patch |
120 |
+ # Debug support. Install radius lib to /usr/lib/freeradius |
121 |
+ "${FILESDIR}"/patches/stg-2.408-makefile-build-upstream.patch |
122 |
+ # Don't compile sgconv always with debug. Remove MAKEOPTS=-j1 |
123 |
+ "${FILESDIR}"/patches/stg-2.408-build-upstream.patch |
124 |
+ # FreeBSD install directory |
125 |
+ "${FILESDIR}"/patches/stg-2.408-radius-upstream.patch |
126 |
+) |
127 |
+ |
128 |
+IUSE="sgconv radius rscriptd sgauth sgconf sgconf_xml stargazer debug" |
129 |
+ |
130 |
+for module in ${STG_MODULES_AUTH} ; do IUSE="${IUSE} module_auth_${module}" ; done |
131 |
+for module in ${STG_MODULES_CAPTURE} ; do IUSE="${IUSE} module_capture_${module}" ; done |
132 |
+for module in ${STG_MODULES_CONFIG} ; do IUSE="${IUSE} module_config_${module}" ; done |
133 |
+for module in ${STG_MODULES_OTHER} ; do IUSE="${IUSE} module_other_${module}" ; done |
134 |
+for module in ${STG_MODULES_STORE} ; do IUSE="${IUSE} module_store_${module}" ; done |
135 |
+ |
136 |
+IUSE=${IUSE/stargazer/+stargazer} |
137 |
+IUSE=${IUSE/module_store_files/+module_store_files} |
138 |
+ |
139 |
+src_prepare() { |
140 |
+ # Rename convertor to sgconv to avoid possible file name collisions |
141 |
+ mv projects/convertor/ projects/sgconv/ \ |
142 |
+ || die "Couldn't move convertor folder" |
143 |
+ mv projects/sgconv/convertor.conf \ |
144 |
+ projects/sgconv/sgconv.conf || die "Couldn't move convertor config" |
145 |
+ |
146 |
+ default |
147 |
+ |
148 |
+ local project |
149 |
+ for project in ${PROJECTS} ; do |
150 |
+ # Rename build script to configure for further econf launch in every project |
151 |
+ mv projects/$project/build projects/$project/configure \ |
152 |
+ || die "Couldn't move build folder for $project" |
153 |
+ # Change check for debug build |
154 |
+ sed -i 's/if \[ "$1" = "debug" \]/if \[ "${10}" = "--enable-debug" \]/' \ |
155 |
+ projects/$project/configure \ |
156 |
+ || die "sed for debug check failed" |
157 |
+ done |
158 |
+ |
159 |
+ # Correct working directory, user and group for sgconv.conf, store_files.conf |
160 |
+ # Correct paths for rscriptd.conf, store_firebird.conf, mod_remote_scriptd.conf, stargazer.conf, rpcconfig.cpp, 00-base-00.sql |
161 |
+ eapply "${FILESDIR}"/patches/stg-2.408-correct-paths.patch |
162 |
+ |
163 |
+ # Correct target install-data for stargazer, rscriptd, sgauth, remove debug symbols stripping |
164 |
+ eapply "${FILESDIR}"/patches/stg-2.408-makefile.patch |
165 |
+ |
166 |
+ # Remove make from script (for keeping symbols), always add variable to Makefile.conf for all projects |
167 |
+ eapply "${FILESDIR}"/patches/stg-2.408-build.patch |
168 |
+ |
169 |
+ # Remove static-libs |
170 |
+ eapply "${FILESDIR}"/patches/stg-2.408-static-libs.patch |
171 |
+ |
172 |
+ # Define which module to compile |
173 |
+ local module |
174 |
+ for module in ${!MODULES[@]} ; do |
175 |
+ if ! use $module ; then |
176 |
+ sed -i "s/${MODULES[$module]%:*}//" \ |
177 |
+ projects/stargazer/configure \ |
178 |
+ || die "sed for module configure failed" |
179 |
+ fi |
180 |
+ done |
181 |
+ |
182 |
+ # Correct Gentoo init script |
183 |
+ sed -i -e 's/opts/extra_commands/' \ |
184 |
+ -e 's/runscript/openrc-run/' \ |
185 |
+ projects/stargazer/inst/linux/etc/init.d/stargazer.gentoo \ |
186 |
+ || die "sed for init-script failed" |
187 |
+ local init |
188 |
+ for init in ${!INIT[@]} ; do |
189 |
+ if use $init ; then |
190 |
+ sed -i "${INIT[$init]}" \ |
191 |
+ projects/stargazer/inst/linux/etc/init.d/stargazer.gentoo \ |
192 |
+ || die "sed for $init failed" |
193 |
+ fi |
194 |
+ done |
195 |
+ |
196 |
+ # Check for IPQ subsystem availability |
197 |
+ if use module_capture_ipq && kernel_is ge 3 5 ; then |
198 |
+ die "The IPQ subsystem requires kernel 3.5 or greater." |
199 |
+ fi |
200 |
+} |
201 |
+ |
202 |
+src_configure() { |
203 |
+ use debug && filter-flags '-O?' |
204 |
+ |
205 |
+ # Define local variables, strip '+' symbol for used by default USE flags |
206 |
+ local USEFLAGS=(${IUSE//+}) |
207 |
+ local PROJECTS=($PROJECTS) |
208 |
+ local i |
209 |
+ |
210 |
+ for (( i = 0 ; i < ${#PROJECTS[@]} ; i++ )) ; do |
211 |
+ if use ${USEFLAGS[$i]} ; then |
212 |
+ cd "${S}"/projects/${PROJECTS[$i]} \ |
213 |
+ || die "cd to ${PROJECTS[$i]} failed" |
214 |
+ econf $(use_enable debug) |
215 |
+ fi |
216 |
+ done |
217 |
+} |
218 |
+ |
219 |
+src_compile() { |
220 |
+ # Define local variables, strip '+' symbol for used by default USE flags |
221 |
+ local USEFLAGS=(${IUSE//+}) |
222 |
+ local PROJECTS=($PROJECTS) |
223 |
+ local i |
224 |
+ |
225 |
+ # Set jobs to 1 for debug build |
226 |
+ use debug && MAKEOPTS="-j1" |
227 |
+ |
228 |
+ # Build necessary libraries first |
229 |
+ touch Makefile.conf |
230 |
+ cd stglibs || die "cd to stglibs failed" |
231 |
+ emake STG_LIBS="ia.lib srvconf.lib" |
232 |
+ |
233 |
+ for (( i = 0 ; i < ${#PROJECTS[@]} ; i++ )) ; do |
234 |
+ if use ${USEFLAGS[$i]} ; then |
235 |
+ cd "${S}"/projects/${PROJECTS[$i]} \ |
236 |
+ || die "cd to ${PROJECTS[$i]} failed" |
237 |
+ emake |
238 |
+ fi |
239 |
+ done |
240 |
+} |
241 |
+ |
242 |
+src_install() { |
243 |
+ if use rscriptd || use stargazer ; then |
244 |
+ # Install config file for logrotate |
245 |
+ insinto /etc/logrotate.d |
246 |
+ newins "${FILESDIR}"/logrotate stargazer |
247 |
+ |
248 |
+ # Keeping logs directory |
249 |
+ diropts -m 755 -o stg -g stg |
250 |
+ keepdir /var/log/stargazer |
251 |
+ if use stargazer ; then |
252 |
+ diropts -m 775 -o stg -g stg |
253 |
+ keepdir /var/lib/stargazer |
254 |
+ fi |
255 |
+ fi |
256 |
+ |
257 |
+ if use sgconv ; then |
258 |
+ cd projects/sgconv || die "cd to sgconv failed" |
259 |
+ |
260 |
+ emake DESTDIR="${D}" PREFIX="${D}" install |
261 |
+ |
262 |
+ # Install files into specified directory |
263 |
+ insinto /etc/stargazer |
264 |
+ doins "${S}"/projects/sgconv/sgconv.conf |
265 |
+ |
266 |
+ # Install manual page |
267 |
+ doman "${FILESDIR}"/mans/sgconv.1 |
268 |
+ fi |
269 |
+ |
270 |
+ if use radius ; then |
271 |
+ cd "${S}"/projects/rlm_stg || die "cd to rlm_stg failed" |
272 |
+ |
273 |
+ emake DESTDIR="${D}" PREFIX="${D}" install |
274 |
+ fi |
275 |
+ |
276 |
+ if use rscriptd ; then |
277 |
+ cd "${S}"/projects/rscriptd || die "cd to rscriptd failed" |
278 |
+ |
279 |
+ emake DESTDIR="${D}" PREFIX="${D}" install |
280 |
+ |
281 |
+ # Install Gentoo init script |
282 |
+ doinitd "${FILESDIR}"/rscriptd |
283 |
+ |
284 |
+ # Correct permissions for file |
285 |
+ fperms 0640 /etc/stargazer/rscriptd.conf |
286 |
+ |
287 |
+ # Install manual page |
288 |
+ doman "${FILESDIR}"/mans/rscriptd.8 |
289 |
+ fi |
290 |
+ |
291 |
+ if use sgauth ; then |
292 |
+ cd "${S}"/projects/sgauth || die "cd to sgauth failed" |
293 |
+ |
294 |
+ emake DESTDIR="${D}" PREFIX="${D}" install |
295 |
+ |
296 |
+ # Correct permissions for file |
297 |
+ fperms 0640 /etc/stargazer/sgauth.conf |
298 |
+ |
299 |
+ # Install manual page |
300 |
+ doman "${FILESDIR}"/mans/sgauth.8 |
301 |
+ fi |
302 |
+ |
303 |
+ if use sgconf ; then |
304 |
+ cd "${S}"/projects/sgconf || die "cd to sgconf failed" |
305 |
+ |
306 |
+ emake DESTDIR="${D}" PREFIX="${D}" install |
307 |
+ |
308 |
+ # Install manual page |
309 |
+ doman "${FILESDIR}"/mans/sgconf.1 |
310 |
+ fi |
311 |
+ |
312 |
+ if use sgconf_xml ; then |
313 |
+ cd "${S}"/projects/sgconf_xml || die "cd to sgconf_xml failed" |
314 |
+ |
315 |
+ emake DESTDIR="${D}" PREFIX="${D}" install |
316 |
+ |
317 |
+ # Install manual page |
318 |
+ doman "${FILESDIR}"/mans/sgconf_xml.1 |
319 |
+ fi |
320 |
+ |
321 |
+ if use stargazer ; then |
322 |
+ cd "${S}"/projects/stargazer || die "cd to stargazer failed" |
323 |
+ |
324 |
+ emake DESTDIR="${D}" PREFIX="${D}" install |
325 |
+ |
326 |
+ # Install docs |
327 |
+ einstalldocs |
328 |
+ |
329 |
+ # Install and rename Gentoo init script |
330 |
+ newinitd "${S}"/projects/stargazer/inst/linux/etc/init.d/stargazer.gentoo stargazer |
331 |
+ |
332 |
+ # Install manual page |
333 |
+ doman "${FILESDIR}"/mans/stargazer.8 |
334 |
+ |
335 |
+ # Install files needed for module_store_files |
336 |
+ if use module_store_files ; then |
337 |
+ # Install files into specified directory |
338 |
+ insinto /var/lib |
339 |
+ doins -r "${S}"/projects/stargazer/inst/var/stargazer |
340 |
+ |
341 |
+ # Correct user and group for files and directories |
342 |
+ fowners -R stg:stg /var/lib/stargazer |
343 |
+ fi |
344 |
+ |
345 |
+ if use module_store_firebird ; then |
346 |
+ # Install files into specified directory |
347 |
+ insinto /usr/share/stargazer/db/firebird |
348 |
+ doins \ |
349 |
+ "${S}"/projects/stargazer/inst/var/00-base-00.sql \ |
350 |
+ "${S}"/projects/stargazer/inst/var/00-alter-01.sql |
351 |
+ fi |
352 |
+ |
353 |
+ if use module_store_mysql ; then |
354 |
+ # Install file into specified directory |
355 |
+ insinto /usr/share/stargazer/db/mysql |
356 |
+ doins "${S}"/projects/stargazer/inst/var/00-mysql-01.sql |
357 |
+ fi |
358 |
+ |
359 |
+ if use module_store_postgres ; then |
360 |
+ # Install files into specified directory |
361 |
+ insinto /usr/share/stargazer/db/postgresql |
362 |
+ doins \ |
363 |
+ "${S}"/projects/stargazer/inst/var/00-base-00.postgresql.sql \ |
364 |
+ "${S}"/projects/stargazer/inst/var/00-alter-01.postgresql.sql |
365 |
+ fi |
366 |
+ |
367 |
+ if use module_other_smux ; then |
368 |
+ # Install files into specified directory |
369 |
+ insinto /usr/share/snmp/mibs |
370 |
+ doins "${S}"/projects/stargazer/plugins/other/smux/STG-MIB.mib |
371 |
+ fi |
372 |
+ |
373 |
+ if use module_other_remote_script ; then |
374 |
+ # Create subnets file based on example from mod_remote_script.conf |
375 |
+ grep 192 "${S}"/projects/stargazer/inst/linux/etc/stargazer/conf-available.d/mod_remote_script.conf \ |
376 |
+ | sed 's/# //' > "${ED}"/etc/stargazer/subnets |
377 |
+ |
378 |
+ # Correct permissions for file |
379 |
+ fperms 0640 /etc/stargazer/subnets |
380 |
+ fi |
381 |
+ |
382 |
+ # Correct permissions for files |
383 |
+ fperms 0640 \ |
384 |
+ /etc/stargazer/rules \ |
385 |
+ /etc/stargazer/stargazer.conf |
386 |
+ |
387 |
+ # Install files into specified directory for selected modules |
388 |
+ insinto /etc/stargazer/conf-available.d |
389 |
+ insopts -m 0640 |
390 |
+ |
391 |
+ local module |
392 |
+ for module in ${!MODULES[@]} ; do |
393 |
+ use $module && doins "${S}"/projects/stargazer/inst/linux/etc/stargazer/conf-available.d/${MODULES[$module]#*:}.conf |
394 |
+ done |
395 |
+ |
396 |
+ # Create symlinks of configs for selected modules |
397 |
+ for module in ${!MODULES[@]} ; do |
398 |
+ use $module \ |
399 |
+ && dosym \ |
400 |
+ /etc/stargazer/conf-available.d/${MODULES[$module]#*:}.conf \ |
401 |
+ /etc/stargazer/conf-enabled.d/${MODULES[$module]#*:}.conf |
402 |
+ done |
403 |
+ fi |
404 |
+ |
405 |
+ # Correct user and gsroup for files and directories |
406 |
+ if use sgconv || use rscriptd || use sgauth || use stargazer ; then |
407 |
+ fowners -R stg:stg /etc/stargazer |
408 |
+ fi |
409 |
+ |
410 |
+ # Put the files in the right folder to support multilib |
411 |
+ if [ ! -e "${ED}"/usr/$(get_libdir) ] ; then |
412 |
+ mv "${ED}"/usr/lib/ "${ED}"/usr/$(get_libdir) \ |
413 |
+ || die "Failed to move library directory for multilib support" |
414 |
+ fi |
415 |
+} |
416 |
+ |
417 |
+pkg_postinst() { |
418 |
+ if use sgconv ; then |
419 |
+ einfo "\nSgconv:" |
420 |
+ einfo "----------" |
421 |
+ einfo "For further use edit /etc/stargazer/sgconv.conf." |
422 |
+ fi |
423 |
+ |
424 |
+ if use radius ; then |
425 |
+ einfo "\nRadius:" |
426 |
+ einfo "-------" |
427 |
+ einfo "For further use emerge net-dialup/freeradius.\n" |
428 |
+ |
429 |
+ einfo "Example config:\n" |
430 |
+ |
431 |
+ einfo "stg {" |
432 |
+ einfo " local_port = 6667" |
433 |
+ einfo " server = localhost" |
434 |
+ einfo " port = 6666" |
435 |
+ einfo " password = 123456" |
436 |
+ einfo " }\n" |
437 |
+ |
438 |
+ einfo "You should place 'stg' into section Instantiate, Authorize." |
439 |
+ einfo "In section Authentificate 'stg' should go in sub-section" |
440 |
+ einfo "Auth-Type before other authentifications modules:\n" |
441 |
+ |
442 |
+ einfo "Auth-Type PAP {" |
443 |
+ einfo " stg" |
444 |
+ einfo " pap" |
445 |
+ einfo "}\n" |
446 |
+ |
447 |
+ einfo "It also may be used in section Accounting and Post-Auth." |
448 |
+ |
449 |
+ use module_auth_freeradius || einfo "\nFor use RADIUS enable USE-flag module_auth_freeradius." |
450 |
+ fi |
451 |
+ |
452 |
+ if use rscriptd ; then |
453 |
+ einfo "\nRemote Script Executer:" |
454 |
+ einfo "-----------------------" |
455 |
+ einfo "For further use edit /etc/stargazer/rscriptd.conf." |
456 |
+ einfo "You have to change 'Password' field at least." |
457 |
+ fi |
458 |
+ |
459 |
+ if use sgauth ; then |
460 |
+ einfo "\nSgauth:" |
461 |
+ einfo "-------" |
462 |
+ einfo "For further use edit /etc/stargazer/sgauth.conf." |
463 |
+ einfo "You have to change 'ServerName', 'Login', 'Password' fields at least." |
464 |
+ fi |
465 |
+ |
466 |
+ if use sgconf ; then |
467 |
+ einfo "\nSgconf:" |
468 |
+ einfo "-------" |
469 |
+ use module_config_sgconfig \ |
470 |
+ || einfo "For further use enable USE-flag module_config_sgconfig." |
471 |
+ fi |
472 |
+ |
473 |
+ if use sgconf_xml ; then |
474 |
+ einfo "\nSgconf_xml:" |
475 |
+ einfo "-----------" |
476 |
+ use module_config_rpcconfig \ |
477 |
+ || einfo "For further use enable USE-flag module_config_rpcconfig." |
478 |
+ fi |
479 |
+ |
480 |
+ if use stargazer ; then |
481 |
+ einfo "\nStargazer:" |
482 |
+ einfo "----------" |
483 |
+ einfo "Modules availability:\n" |
484 |
+ if use module_auth_always_online ; then |
485 |
+ einfo "* module_auth_always_online available." |
486 |
+ fi |
487 |
+ if use module_auth_internet_access ; then |
488 |
+ einfo "* module_auth_internet_access available." |
489 |
+ fi |
490 |
+ if use module_auth_freeradius ; then |
491 |
+ einfo "* module_auth_freeradius available.\n" |
492 |
+ einfo "For further use emerge net-dialup/freeradius.\n" |
493 |
+ use radius || einfo "\n For use RADIUS enable use USE-flag radius." |
494 |
+ fi |
495 |
+ if use module_capture_ipq ; then |
496 |
+ einfo "* module_capture_ipq available." |
497 |
+ fi |
498 |
+ if use module_capture_ether ; then |
499 |
+ einfo "* module_capture_ether available." |
500 |
+ fi |
501 |
+ if use module_capture_netflow ; then |
502 |
+ einfo "* module_capture_netflow available.\n" |
503 |
+ einfo "For further use emerge any netflow sensor:\n" |
504 |
+ einfo "net-firewall/ipt_netflow or net-analyzer/softflowd.\n" |
505 |
+ fi |
506 |
+ if use module_config_sgconfig ; then |
507 |
+ einfo "* module_config_sgconfig available." |
508 |
+ fi |
509 |
+ if use module_config_rpcconfig ; then |
510 |
+ einfo "* module_config_rpcconfig available.\n" |
511 |
+ einfo "KNOWN BUG: Sometimes you can't configure Stargazer" |
512 |
+ einfo "through xml-based configurator, because module is not responding." |
513 |
+ einfo "This bug is introduced by xmlrpc-c library." |
514 |
+ einfo "This bug proceeds very rare, but it still exists.\n" |
515 |
+ fi |
516 |
+ if use module_other_ping ; then |
517 |
+ einfo "* module_other_ping available." |
518 |
+ fi |
519 |
+ if use module_other_smux ; then |
520 |
+ einfo "* module_other_smux available.\n" |
521 |
+ einfo "For further use emerge net-analyzer/net-snmp.\n" |
522 |
+ fi |
523 |
+ if use module_other_remote_script ; then |
524 |
+ einfo "* module_other_remote_script available.\n" |
525 |
+ einfo "For further use edit /etc/stargazer/subnets.\n" |
526 |
+ fi |
527 |
+ if use module_store_files ; then |
528 |
+ einfo "* module_store_files available." |
529 |
+ fi |
530 |
+ if use module_store_firebird ; then |
531 |
+ einfo "* module_store_firebird available.\n" |
532 |
+ einfo "You should add 'firebird' user to stg group:\n" |
533 |
+ einfo "# usermod -a -G stg firebird\n" |
534 |
+ einfo "and restart firebird:\n" |
535 |
+ einfo "# /etc/init.d/firebird restart\n" |
536 |
+ einfo "Stargazer DB schema for Firebird is here: /usr/share/stargazer/db/firebird" |
537 |
+ einfo "For new setup you should execute 00-base-00.sql:\n" |
538 |
+ einfo "# fbsql -q -i /usr/share/stargazer/db/firebird/00-base-00.sql\n" |
539 |
+ einfo "For upgrade from version 2.406 you should execute 00-alter-01.sql:\n" |
540 |
+ einfo "# fbsql -i /usr/share/stargazer/db/firebird/00-alter-01.sql\n" |
541 |
+ fi |
542 |
+ if use module_store_mysql ; then |
543 |
+ einfo "* module_store_mysql available.\n" |
544 |
+ einfo "For upgrade from version 2.406 you should execute 00-mysql-01.sql:\n" |
545 |
+ einfo "# mysql < /usr/share/stargazer/db/mysql/00-mysql-01.sql\n" |
546 |
+ fi |
547 |
+ if use module_store_postgres ; then |
548 |
+ einfo "* module_store_postgres available.\n" |
549 |
+ einfo "DB schema for PostgresSQL is here: /usr/share/stargazer/db/postgresql" |
550 |
+ einfo "For new setup you should execute 00-base-00.postgresql.sql:\n" |
551 |
+ einfo "# psql -f /usr/share/stargazer/db/postgresql/00-base-00.postgresql.sql\n" |
552 |
+ einfo "For upgrade from version 2.406 you should execute 00-alter-01.sql:\n" |
553 |
+ einfo "# psql -f /usr/share/stargazer/db/postgresql/00-alter-01.sql\n" |
554 |
+ fi |
555 |
+ einfo "\n For all storage backends:\n" |
556 |
+ einfo "* Default admin login - admin, default admin password - 123456." |
557 |
+ einfo "* Default subscriber login - test, default subscriber password - 123456.\n" |
558 |
+ einfo "Don't run newer versions without reading their ChangeLog first," |
559 |
+ einfo "it can be found in /usr/share/doc/${PF}" |
560 |
+ fi |
561 |
+ if use debug ; then |
562 |
+ ewarn "\nThis is a debug build, avoid to use it in production." |
563 |
+ fi |
564 |
+} |