Mailinglist Archive: yast-commit (819 mails)

< Previous Next >
[yast-commit] r54362 - /trunk/mail/src/YaPI/MailServer.pm
  • From: varkoly@xxxxxxxxxxxxxxxx
  • Date: Mon, 05 Jan 2009 12:22:55 -0000
  • Message-id: <E1LJoTv-0008Nv-95@xxxxxxxxxxxxxxxx>
Author: varkoly
Date: Mon Jan 5 13:22:54 2009
New Revision: 54362

URL: http://svn.opensuse.org/viewcvs/yast?rev=54362&view=rev
Log:
the myhostname must be set to FQHN

Modified:
trunk/mail/src/YaPI/MailServer.pm

Modified: trunk/mail/src/YaPI/MailServer.pm
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/mail/src/YaPI/MailServer.pm?rev=54362&r1=54361&r2=54362&view=diff
==============================================================================
--- trunk/mail/src/YaPI/MailServer.pm (original)
+++ trunk/mail/src/YaPI/MailServer.pm Mon Jan 5 13:22:54 2009
@@ -2917,8 +2917,10 @@
my @ACONF = <IN>;
close(IN);

- my $isclam = 0;
- my $ismax = 0;
+ my $isclam = 0;
+ my $ismax = 0;
+ my $ismyhostname = 0;
+ my $myhostname = `hostname -f`;
foreach my $l ( @ACONF )
{
if ( $l =~ s/^\$max_servers = .*;/\$max_servers = $VSCount;/ )
@@ -2927,6 +2929,12 @@
next if $ismax;
$ismax = 1;
}
+ if ( $l =~ s/^\$myhostname = .*;/\$myhostname = $myhostname;/ )
+ {
+ #fix bnc#450888 : remove the supplementary entries
+ next if $ismyhostname;
+ $ismyhostname = 1;
+ }
$l =~ s/(.*)/# $1/ if $l =~ /bypass_virus_checks_acl.*=.*qw\( \./;
if( $isclam || $l =~ /Clam Antivirus-clamd/ )
{
@@ -2944,6 +2952,10 @@
{
push @CONF, '$max_servers = '.$VSCount;
}
+ if( !$ismyhostname )
+ {
+ push @CONF, '$myhostname = '.$myhostname;
+ }
if( ! open(OUT,">$aconf.new") )
{
return "Error: $!";

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages