pf-tools commit: r581 [ccaillet-guest] - in /trunk: debian/changelog lib/PFTools/Net.pm
parmelan-guest at users.alioth.debian.org
parmelan-guest at users.alioth.debian.org
Tue Mar 4 12:43:10 UTC 2008
Author: ccaillet-guest
Date: Tue Mar 4 12:43:10 2008
New Revision: 581
URL: http://svn.debian.org/wsvn/pf-tools/?sc=1&rev=581
Log:
* Avoiding perl warning on shortname definition if not present on host
section
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=581&op=diff
==============================================================================
--- trunk/debian/changelog (original)
+++ trunk/debian/changelog Tue Mar 4 12:43:10 2008
@@ -35,6 +35,8 @@
* adding bonding settings for hosts
* adding ERR: message when an interface ethX is defined in bonding and in an
interface defintion
+ * Avoiding perl warning on shortname definition if not present on host
+ section
[ Thomas Parmelan ]
* lib-net: if no comment is specified in a zone, network or server
@@ -46,7 +48,7 @@
* Update my email address.
* Merge the remaining changes from 0.32.47-1 and 0.32.48-1.
- -- Christophe Caillet <quadchris at free.fr> Tue, 04 Mar 2008 10:41:17 +0100
+ -- Christophe Caillet <quadchris at free.fr> Tue, 04 Mar 2008 13:41:43 +0100
pf-tools (0.32.48-1) unstable; urgency=low
Modified: trunk/lib/PFTools/Net.pm
URL: http://svn.debian.org/wsvn/pf-tools/trunk/lib/PFTools/Net.pm?rev=581&op=diff
==============================================================================
--- trunk/lib/PFTools/Net.pm (original)
+++ trunk/lib/PFTools/Net.pm Tue Mar 4 12:43:10 2008
@@ -1092,7 +1092,7 @@
}
# Definition de l'alias DNS principal
- if ( $S->{'shortname'} eq $lan ) {
+ if ( defined $S->{'shortname'} && $S->{'shortname'} eq $lan ) {
$M->{'zone'}->{$mnam} = {};
$M->{'zone'}->{$mnam}->{'FIELD'} = $nam;
$M->{'zone'}->{$mnam}->{'TYPE'} = 'CNAME';
@@ -1231,21 +1231,23 @@
}
# Insertion de la classe de serveurs dans la structure principale
- if ( defined $S->{'ipstart'}->{ $S->{'shortname'} } ) {
- $start = $S->{'ipstart'}->{ $S->{'shortname'} };
- }
- else {
- $start = $S->{'ipstart'}->{'default'};
- }
-
- $Z->{'SERVERS'}->{'BY_ADDR'}->{
- Address(
- $Z->{'NETWORK'}->{'BY_NAME'}->{ $S->{'shortname'} }->{'network'},
- $start, 0
- )
+ if ( defined $S->{'shortname'} ) {
+ if ( defined $S->{'ipstart'}->{ $S->{'shortname'} } ) {
+ $start = $S->{'ipstart'}->{ $S->{'shortname'} };
+ }
+ else {
+ $start = $S->{'ipstart'}->{'default'};
+ }
+
+ $Z->{'SERVERS'}->{'BY_ADDR'}->{
+ Address(
+ $Z->{'NETWORK'}->{'BY_NAME'}->{ $S->{'shortname'} }->{'network'},
+ $start, 0
+ )
}
= $N;
- $Z->{'SERVERS'}->{'BY_NAME'}->{$srv} = $N;
+ $Z->{'SERVERS'}->{'BY_NAME'}->{$srv} = $N;
+ }
# Remapping UM
if ($UML) {
More information about the pf-tools-commits
mailing list