From f0ef68534916cc16c951b510116b06afd1b0caa2 Mon Sep 17 00:00:00 2001 From: maniacikarus Date: Tue, 7 Aug 2007 18:06:17 +0000 Subject: [PATCH] =?utf8?q?DMZ=20Pinholes=20korrigiert=20Kleine=20Anpassung?= =?utf8?q?=20am=20Guardian=20Skript=20Samba=20init=20beim=20restart=20das?= =?utf8?q?=20sleep=20verl=C3=A4ngert?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@744 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8 --- config/guardian/guardian.pl | 16 ++++------------ html/cgi-bin/dmzholes.cgi | 10 +++------- src/initscripts/init.d/samba | 2 +- 3 files changed, 8 insertions(+), 20 deletions(-) diff --git a/config/guardian/guardian.pl b/config/guardian/guardian.pl index d06267b110..82e5c58cba 100644 --- a/config/guardian/guardian.pl +++ b/config/guardian/guardian.pl @@ -67,7 +67,6 @@ $counter=0; open (ALERT2, "/var/log/messages" ) or die "can't open /var/log/messages: $!\n"; seek (ALERT2, 0, 2); # set the position to EOF. # this is the same as a tail -f :) -$counter2=0; for (;;) { sleep 1; @@ -85,14 +84,7 @@ for (;;) { my @array=split(/ /,$_);&checkem ($array[5], $hostipaddr, "Portscan was detected.");} } } - # Run this stuff every 30 seconds.. - if ($counter == 30) { - &remove_blocks; # This might get moved elsewhere, depending on how much load - # it puts on the system.. - &check_log_name; - $counter=0; - } else { $counter=$counter+1; } - + sleep 1; if (seek(ALERT2,0,1)){ while () { @@ -102,12 +94,12 @@ for (;;) { } } # Run this stuff every 30 seconds.. - if ($counter2 == 30) { + if ($counter == 30) { &remove_blocks; # This might get moved elsewhere, depending on how much load # it puts on the system.. &check_log_name; - $counter2=0; - } else { $counter2=$counter2+1; } + $counter=0; + } else { $counter=$counter+1; } } sub check_log_name { diff --git a/html/cgi-bin/dmzholes.cgi b/html/cgi-bin/dmzholes.cgi index 26275ae802..5653095dca 100644 --- a/html/cgi-bin/dmzholes.cgi +++ b/html/cgi-bin/dmzholes.cgi @@ -423,18 +423,14 @@ sub validNet sub haveOrangeNet { - if ($netsettings{'CONFIG_TYPE'} == 1) {return 1;} - if ($netsettings{'CONFIG_TYPE'} == 3) {return 1;} - if ($netsettings{'CONFIG_TYPE'} == 5) {return 1;} - if ($netsettings{'CONFIG_TYPE'} == 7) {return 1;} + if ($netsettings{'CONFIG_TYPE'} == 2) {return 1;} + if ($netsettings{'CONFIG_TYPE'} == 4) {return 1;} return 0; } sub haveBlueNet { + if ($netsettings{'CONFIG_TYPE'} == 3) {return 1;} if ($netsettings{'CONFIG_TYPE'} == 4) {return 1;} - if ($netsettings{'CONFIG_TYPE'} == 5) {return 1;} - if ($netsettings{'CONFIG_TYPE'} == 6) {return 1;} - if ($netsettings{'CONFIG_TYPE'} == 7) {return 1;} return 0; } diff --git a/src/initscripts/init.d/samba b/src/initscripts/init.d/samba index 5db0658690..a9bebeaf92 100644 --- a/src/initscripts/init.d/samba +++ b/src/initscripts/init.d/samba @@ -37,7 +37,7 @@ case "$1" in restart) $0 stop - sleep 3 + sleep 5 $0 start ;; -- 2.39.5