Merge branch 'master' of ssh://git.ipfire.org/srv/git/ipfire-2.x

This commit is contained in:
Michael Tremer
2011-02-16 21:05:32 +01:00
30 changed files with 166 additions and 68 deletions

View File

@@ -865,7 +865,7 @@ sub checkcryptodb {
unless ( "$ret" eq "0" ) {
message("CRYPTO WARN: The GnuPG isn't configured corectly. Trying now to fix this.");
message("CRYPTO WARN: It's normal to see this on first execution.");
my $command = "gpg --keyserver pgp.mit.edu --always-trust --status-fd 2";
my $command = "gpg --keyserver pgp.ipfire.org --always-trust --status-fd 2";
system("$command --recv-key $myid >> $Conf::logdir/gnupg-database.log 2>&1");
system("$command --recv-key $trustid >> $Conf::logdir/gnupg-database.log 2>&1");
} else {

View File

@@ -23,4 +23,4 @@
#
. /opt/pakfire/lib/functions.sh
extract_files
/usr/local/bin/clamavctrl enable
/usr/local/bin/clamavctrl enable &

View File

@@ -174,33 +174,6 @@ if ($ip ne $ipcache) {
&General::log("Dynamic DNS ip-update for cjb.net ($settings{'LOGIN'}) : failure (could not connect to server)");
}
}
elsif ($settings{'SERVICE'} eq 'mydyn') {
# use proxy ?
my %proxysettings;
&General::readhash("${General::swroot}/proxy/settings", \%proxysettings);
if ($_=$proxysettings{'UPSTREAM_PROXY'}) {
my ($peer, $peerport) = (/^(?:[a-zA-Z ]+\:\/\/)?(?:[A-Za-z0-9\_\.\-]*?(?:\:[A-Za-z0-9\_\.\-]*?)?\@)?([a-zA-Z0-9\.\_\-]*?)(?:\:([0-9]{1,5}))?(?:\/.*?)?$/);
Net::SSLeay::set_proxy($peer,$peerport,$proxysettings{'UPSTREAM_USER'},$proxysettings{'UPSTREAM_PASSWORD'} );
}
my ($out, $response) = Net::SSLeay::get_http( 'www.mydyn.de',
80,
"/cgi-bin/update.pl?$settings{'LOGIN'}-$settings{'PASSWORD'}",
Net::SSLeay::make_headers('User-Agent' => 'IPFire' )
);
if ($response =~ m%HTTP/1\.. 200 OK%) {
if ( $out !~ m/The IP address of the subdomain/ ) {
&General::log("Dynamic DNS ip-update for mydyn.de ($settings{'LOGIN'}) : failure (bad password or login)");
} else {
&General::log("Dynamic DNS ip-update for mydyn.de ($settings{'LOGIN'}) : success");
$success++;
}
} else {
&General::log("Dynamic DNS ip-update for mydyn.de ($settings{'LOGIN'}) : failure (could not connect to server)");
}
}
elsif ($settings{'SERVICE'} eq 'selfhost') {
# use proxy ?
my %proxysettings;
@@ -390,7 +363,7 @@ if ($ip ne $ipcache) {
&General::log("Dynamic DNS ip-update for $settings{'HOSTNAME'}.$settings{'DOMAIN'} : failure (could not connect to server)");
}
}
elsif ($settings{'SERVICE'} eq 'regfish') {
elsif ($settings{'SERVICE'} eq 'strato') {
# use proxy ?
my %proxysettings;
&General::readhash("${General::swroot}/proxy/settings", \%proxysettings);
@@ -398,24 +371,61 @@ if ($ip ne $ipcache) {
my ($peer, $peerport) = (/^(?:[a-zA-Z ]+\:\/\/)?(?:[A-Za-z0-9\_\.\-]*?(?:\:[A-Za-z0-9\_\.\-]*?)?\@)?([a-zA-Z0-9\.\_\-]*?)(?:\:([0-9]{1,5}))?(?:\/.*?)?$/);
Net::SSLeay::set_proxy($peer,$peerport,$proxysettings{'UPSTREAM_USER'},$proxysettings{'UPSTREAM_PASSWORD'} );
}
my ($out, $response) = Net::SSLeay::get_https( 'dyndns.regfish.de',
if ($settings{'HOSTNAME'} eq '') {
$settings{'HOSTDOMAIN'} = $settings{'DOMAIN'};
} else {
$settings{'HOSTDOMAIN'} = "$settings{'HOSTNAME'}.$settings{'DOMAIN'}";
}
my ($out, $response) = Net::SSLeay::get_https( 'dyndns.strato.com',
443,
"/nic/update?hostname=$settings{'HOSTDOMAIN'}&myip=$ip",
Net::SSLeay::make_headers('User-Agent' => 'IPFire',
'Authorization' => 'Basic ' . encode_base64("$settings{'LOGIN'}:$settings{'PASSWORD'}") )
);
if ($response =~ m%HTTP/1\.. 200 OK%) {
#Valid responses from update => ErrCount=0
if ( $out =~ m/good |nochg /ig) {
&General::log("Dynamic DNS ip-update for $settings{'HOSTNAME'}.$settings{'DOMAIN'} : success");
$success++;
} else {
&General::log("Dynamic DNS ip-update for $settings{'HOSTNAME'}.$settings{'DOMAIN'} : failure1 ($out)");
$success++;
}
} elsif ( $out =~ m/<title>(.*)<\/title>/ig ) {
&General::log("Dynamic DNS ip-update for $settings{'HOSTNAME'}.$settings{'DOMAIN'} : failure2 ($1)");
} else {
&General::log("Dynamic DNS ip-update for $settings{'HOSTNAME'}.$settings{'DOMAIN'} : failure3 ($response)");
}
}
elsif ($settings{'SERVICE'} eq 'regfish') {
# use proxy ?
my %proxysettings;
&General::readhash("${General::swroot}/proxy/settings", \%proxysettings);
if ($_=$proxysettings{'UPSTREAM_PROXY'}) {
my ($peer, $peerport) = (/^(?:[a-zA-Z ]+\:\/\/)?(?:[A-Za-z0-9\_\.\-]*?(?:\:[A-Za-z0-9\_\.\-]*?)?\@)?([a-zA-Z0-9\.\_\-]*?)(?:\:([0-9]{1,5}))?(?:\/.*?)?$/);
Net::SSLeay::set_proxy($peer,$peerport,$proxysettings{'UPSTREAM_USER'},$proxysettings{'UPSTREAM_PASSWORD'} );
}
my ($out, $response) = Net::SSLeay::get_https( 'dyndns.regfish.de',
443,
"/?fqdn=$settings{'DOMAIN'}&ipv4=$ip&forcehost=1&authtype=secure&token=$settings{'LOGIN'}",
Net::SSLeay::make_headers('User-Agent' => 'Ipfire' )
);
#Valid responses from service are:
# success|100|update succeeded!
# success|101|no update needed at this time..
if ($response =~ m%HTTP/1\.. 200 OK%) {
if ( $out !~ m/(success\|(100|101)\|)/ig ) {
&General::log("Dynamic DNS ip-update for $settings{'DOMAIN'} : failure ($out)");
} else {
&General::log("Dynamic DNS ip-update for $settings{'DOMAIN'} : success");
$success++;
}
#Valid responses from service are:
#success|100|update succeeded!
#success|101|no update needed at this time..
if ($response =~ m%HTTP/1\.. 200 OK%) {
if ( $out !~ m/(success\|(100|101)\|)/ig ) {
&General::log("Dynamic DNS ip-update for $settings{'DOMAIN'} : failure ($out)");
} else {
&General::log("Dynamic DNS ip-update for $settings{'DOMAIN'} : failure (could not connect to server)");
&General::log("Dynamic DNS ip-update for $settings{'DOMAIN'} : success");
$success++;
}
} else {
&General::log("Dynamic DNS ip-update for $settings{'DOMAIN'} : failure (could not connect to server)");
}
}
elsif ($settings{'SERVICE'} eq 'ovh') {
my %proxysettings;