jablonka.czprosek.czf

hotsanic

Subversion Repositories:
[/] [branches/] [HotSaNIC-0.5.0-pre6/] [modules/] [dnet/] [setup.pl] - Blame information for rev 13

 

Line No. Rev Author Line
11simandl#!/usr/bin/env perl
2 
3# $Id: setup.pl,v 1.8 2004/07/12 07:50:14 bernisys Exp $
4 
5# include PERL libraries
6use strict;
7use warnings;
8use diagnostics;
9 
10# include HotSaNIC libraries
11use lib "../../lib";
12use lib "./platform";
13use HotSaNICparser;
14 
15use HotSaNIClog;
16use common;
17 
18$|=1;
19 
20(my $VERSION = '$Revision: 1.8 $') =~ s/.*(\d+\.\d+).*/$1/;
21(my $IDENTIFIER = '$Id: setup.pl,v 1.8 2004/07/12 07:50:14 bernisys Exp $') =~ s/.*,v (.*) \$/$1/;
22 
23my $MODNAME=HotSaNICparser::get_module_name();
24my %MODCONF=HotSaNICmod::common::configure();
25my $OUTFILE="settings.new";
26if ( ! -e "settings" ) { $OUTFILE="settings"; }
27open OUTFILE,">$OUTFILE" || die "could not open ".HotSaNICparser::get_module_name()." settings file for writing.\n";
28 
29if (@{$MODCONF{NETWORK}}) { $MODCONF{NETWORK}="NETWORK=\"".join("\"\nNETWORK=\"",@{$MODCONF{NETWORK}})."\""; }
30else { $MODCONF{NETWORK}="NETWORK=\"other:*\"\nNETWORK=\"local:127.0.0.\""; }
31 
32print OUTFILE "# SHORT DESCRIPTION
33#
34# first of all you have to configure the pathes to the dnet logfiles
35#
36# Example:
37#
38# LOGPATH=/var/log/rc5
39# LOGNAME_RC5=pproxyrc5
40# LOGNAME_DES=pproxydes
41# LOGNAME_CSC=pproxycsc
42# LOGNAME_OGR=pproxyogr
43#
44LOGPATH=\"$MODCONF{LOGPATH}\"
45LOGNAME_RC5=\"$MODCONF{LOGNAME_RC5}\"
46LOGNAME_DES=\"$MODCONF{LOGNAME_DES}\"
47LOGNAME_CSC=\"$MODCONF{LOGNAME_CSC}\"
48LOGNAME_OGR=\"$MODCONF{LOGNAME_OGR}\"
49 
50# Then you may define one or more networks or hosts to be shown separately
51#
52#
53# NETWORK=<name>:<network1>,<network2>, ...
54#
55# each network may be a single host or a network
56# each network has to be terminated by a dot.
57#
58# ATTENTION! \"network\" means a network-address with the last
59# part cleared out ... well let me give you a hint:
60# 192.168.1. would be 192.168.1.0/24
61# 192.168. would be 192.168.0.0/16
62#
63# sorry, but my module does not yet understand netmasks :(
64# but i intend to edit the whole thing some day when time is my friend again...
65#
66# Example:
67#
68# NETWORK=other:*
69# NETWORK=unknown_local:192.168.1.
70# NETWORK=host1:192.168.1.1.
71# NETWORK=host2:192.168.1.20.
72# NETWORK=some_hosts:192.168.1.30.,192.168.1.31.,192.168.1.32.
73#
74$MODCONF{NETWORK}
75";
76 
77close OUTFILE;
78 
79if ($OUTFILE eq "settings.new") {
80 HotSaNICparser::backup_file("settings");
81 rename "settings.new","settings";
82 }
83 
84print "Please check the settings file and adapt it to satisfy your needs.\n";
85 

Powered by WebSVN 2.2.1