From b66468fdff01fc92666409dabbaa95e5fea3dada Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Sat, 23 Sep 2006 06:02:23 +0000 Subject: [PATCH] Bug 351243: Public webdot server changed its IP address Patch By Max Kanat-Alexander r=colin, a=justdave --- checksetup.pl | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/checksetup.pl b/checksetup.pl index b35f965f60..f7d3513e48 100755 --- a/checksetup.pl +++ b/checksetup.pl @@ -1094,7 +1094,7 @@ END # if research.att.com ever changes their IP, or if you use a different # webdot server, you'll need to edit this - Allow from 192.20.225.10 + Allow from 192.20.225.0/24 Deny from all @@ -1109,6 +1109,21 @@ END close HTACCESS; chmod $fileperm, "$webdotdir/.htaccess"; } + else { + # The public webdot IP address changed. + my $webdot = new IO::File("$webdotdir/.htaccess", 'r') + || die "$webdotdir/.htaccess: $!"; + my $webdot_data; + { local $/; $webdot_data = <$webdot>; } + $webdot->close; + if ($webdot_data =~ /192\.20\.225\.10/) { + print "Repairing $webdotdir/.htaccess...\n"; + $webdot_data =~ s/192\.20\.225\.10/192.20.225.0\/24/g; + $webdot = new IO::File("$webdotdir/.htaccess", 'w') || die $!; + print $webdot $webdot_data; + $webdot->close; + } + } } -- 2.47.2