pf-tools commit: r463 [parmelan-guest] - in /trunk: debian/changelog lib/PFTools/Net.pm

parmelan-guest at users.alioth.debian.org parmelan-guest at users.alioth.debian.org
Thu Mar 15 17:51:28 CET 2007


Author: parmelan-guest
Date: Thu Mar 15 16:51:28 2007
New Revision: 463

URL: http://svn.debian.org/wsvn/pf-tools/?sc=1&rev=463
Log:
Cleanup of the last commit: suppress the warning, it is too annoying.
Just forge a default comment and that's all.

Modified:
    trunk/debian/changelog
    trunk/lib/PFTools/Net.pm

Modified: trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pf-tools/trunk/debian/changelog?rev=463&op=diff
==============================================================================
--- trunk/debian/changelog (original)
+++ trunk/debian/changelog Thu Mar 15 16:51:28 2007
@@ -8,10 +8,9 @@
 
   [ Thomas Parmelan ]
   * lib-net: if no comment is specified in a zone, network or server
-    declaration, forge a default comment (to stop a few Perl warnings) and
-    emits a warning asking to correct the configuration.
-
- -- Thomas Parmelan <parmelan+debian at free.fr>  Thu, 15 Mar 2007 16:18:59 +0100
+    declaration, forge a default comment to prevent a few Perl warnings.
+
+ -- Thomas Parmelan <tom+pf-tools at ankh.fr.EU.org>  Thu, 15 Mar 2007 17:47:23 +0100
 
 pf-tools (0.32.46-1) unstable; urgency=low
 

Modified: trunk/lib/PFTools/Net.pm
URL: http://svn.debian.org/wsvn/pf-tools/trunk/lib/PFTools/Net.pm?rev=463&op=diff
==============================================================================
--- trunk/lib/PFTools/Net.pm (original)
+++ trunk/lib/PFTools/Net.pm Thu Mar 15 16:51:28 2007
@@ -828,15 +828,9 @@
             . ") pour le numero!" );
     }
 
-    unless ($S->{comment}) {
-	Warn( $ERR_SYNTAX,
-	    "No (or empty) comment for server $srv - please fix in config" );
-	$S->{comment} = "Server $srv <no comment specified>";
-    }
-
     # Initialisation de la structure pour ces serveurs
     my $N = {};
-    $N->{'comment'} = $S->{'comment'};
+    $N->{'comment'} = $S->{'comment'} || "Server $srv <no comment specified>";
     $N->{'type'}    = $S->{'type'};
 
     #$N->{range}   = $S->{range};
@@ -1201,12 +1195,6 @@
             . $Z->{'SOA'}->{'name'} . ") et (" . $zone . ")" );
     }
 
-    unless ($S->{comment}) {
-	Warn( $ERR_SYNTAX,
-	    "No (or empty) comment for zone $zone - please fix in config" );
-	$S->{comment} = "Zone $zone <no comment specified>";
-    }
-
     # Ajout des informations SOA
     # Le numero de serie est genere automatiquement, on prends
     # l'heure system en seconde.
@@ -1234,7 +1222,7 @@
         $Z->{'SOA'}->{'serial'} = $t_secs . "\t; Serial (" . $t_text . ")";
     }
     $Z->{'SOA'}->{'name'}    = $zone;
-    $Z->{'SOA'}->{'comment'} = $S->{'comment'};
+    $Z->{'SOA'}->{'comment'} = $S->{'comment'} || "Zone $zone <no comment specified>";
     $Z->{'SOA'}->{'soa'}     = $soa;
     $Z->{'SOA'}->{'mail'}    = $mail;
     $Z->{'SOA'}->{'refresh'} = $S->{'refresh'};
@@ -1289,12 +1277,6 @@
             "Adresse de reseau dupliquee ("
             . $S->{'network'}
             . ") pour le reseau " . $net );
-    }
-
-    unless ($S->{comment}) {
-	Warn( $ERR_SYNTAX,
-	    "No (or empty) comment for network $net - please fix in config" );
-	$S->{comment} = "Network $net <no comment specified>";
     }
 
     # Calcul des adresses, netmasks et broadcasts
@@ -1306,7 +1288,7 @@
     $N->{'mtu'}       = $S->{'mtu'};
     $N->{'tag'}       = $S->{'tag'};
     $N->{'media'}     = $S->{'media'};
-    $N->{'comment'}   = $S->{'comment'};
+    $N->{'comment'}   = $S->{'comment'} || "Network $net <no comment specified>";
 
     # Insertion dans la structure principale
     $Z->{'NETWORK'}->{'BY_ADDR'}->{ $N->{'network'} } = $N;




More information about the Pf-tools-commits mailing list