pf-tools commit: r720 [ccaillet-guest] - in /branches/0.33-stable: debian/changelog filters/filter_privateresolve lib/PFTools/Net.pm
parmelan-guest at users.alioth.debian.org
parmelan-guest at users.alioth.debian.org
Wed Nov 25 14:29:11 UTC 2009
Author: ccaillet-guest
Date: Wed Nov 25 14:29:11 2009
New Revision: 720
URL: http://svn.debian.org/wsvn/pf-tools/?sc=1&rev=720
Log:
* filters/filter_privateresolve : substitution occured with POPNAME keyword
accroding to the value which is in $SUBST hashtable
* lib/PFTools/Net.pm : permit different bonding definition for a specified
host number (NEED TESTING!!)
Modified:
branches/0.33-stable/debian/changelog
branches/0.33-stable/filters/filter_privateresolve
branches/0.33-stable/lib/PFTools/Net.pm
Modified: branches/0.33-stable/debian/changelog
URL: http://svn.debian.org/wsvn/pf-tools/branches/0.33-stable/debian/changelog?rev=720&op=diff
==============================================================================
--- branches/0.33-stable/debian/changelog (original)
+++ branches/0.33-stable/debian/changelog Wed Nov 25 14:29:11 2009
@@ -7,6 +7,10 @@
- in $FUNCTION->{'apt-get'} : adding handler for version directive which
specifies a version to install (NEED TESTING!!). A control is done for
the availability of the specified version.
+ * filters/filter_privateresolve : substitution occured with POPNAME keyword
+ accroding to the value which is in $SUBST hashtable
+ * lib/PFTools/Net.pm : permit different bonding definition for a specified
+ host number (NEED TESTING!!)
[ Thomas Parmelan ]
* tools/kvmlaunch:
@@ -14,7 +18,7 @@
command line, otherwiser DHCP requests will go out on the wrong
interface.
- -- Thomas Parmelan <tom+pf-tools at ankh.fr.EU.org> Tue, 24 Nov 2009 16:13:26 +0100
+ -- Christophe Caillet <tof at sitadelle.com> Wed, 25 Nov 2009 15:20:38 +0100
pf-tools (0.33.18-1) unstable; urgency=low
Modified: branches/0.33-stable/filters/filter_privateresolve
URL: http://svn.debian.org/wsvn/pf-tools/branches/0.33-stable/filters/filter_privateresolve?rev=720&op=diff
==============================================================================
--- branches/0.33-stable/filters/filter_privateresolve (original)
+++ branches/0.33-stable/filters/filter_privateresolve Wed Nov 25 14:29:11 2009
@@ -25,6 +25,7 @@
use PFTools::Net;
use PFTools::Update;
+use PFTools::Conf;
my ( $src, $host, $dst, $sep ) = @ARGV;
unless ( $src and $host and $dst ) {
@@ -58,6 +59,7 @@
my $match2 = $match;
$match2 =~ s/HOSTNAME/$host/;
+ $match2 =~ s/POPNAME/$SUBST{'POPNAME'}/g;
my @resolved = Resolv( $match2, $Z );
Modified: branches/0.33-stable/lib/PFTools/Net.pm
URL: http://svn.debian.org/wsvn/pf-tools/branches/0.33-stable/lib/PFTools/Net.pm?rev=720&op=diff
==============================================================================
--- branches/0.33-stable/lib/PFTools/Net.pm (original)
+++ branches/0.33-stable/lib/PFTools/Net.pm Wed Nov 25 14:29:11 2009
@@ -845,7 +845,6 @@
my $s;
# Calcul de la plage d'adresse alouee et du nombre de serveurs a definir
-
if ( !defined( $S->{'nodes'} ) ) {
$S->{'nodes'} = 1;
}
@@ -1022,6 +1021,7 @@
if ( defined $S->{'bonding'} ) {
foreach my $bond ( keys %{$S->{'bonding'}} ) {
if ( defined $S->{'bonding'}->{$bond}->{$mnamindexnum} ) {
+ warn "Adding specific bonding parameter : $S->{'bonding'}->{$bond}->{$mnamindexnum}\n" ;
@{$M->{'bonding'}->{$bond}} = split ( /,/, $S->{'bonding'}->{$bond}->{$mnamindexnum} ) ;
}
elsif ( defined $S->{'bonding'}->{$bond}->{'default'} ) {
@@ -1031,8 +1031,18 @@
Abort( $ERR_SYNTAX, "No default bonding config defined for interface ".$bond ) ;
}
foreach my $iface ( @{$M->{'bonding'}->{$bond}} ) {
- if ( defined $S->{'interface'}->{$iface} ) {
- Abort( $ERR_SYNTAX, "Cannot define interface $iface: already used in bonding definition $bond" );
+ if ( defined $S->{'interface'}->{$iface} ) {
+ if ( ref ( $S->{'interface'}->{$iface} ) eq 'HASH' ) {
+ if ( defined $S->{'interface'}->{$iface}->{$mnamindexnum} ) {
+ warn "HASH : $iface est definie dans S->{'interface'}\n" ;
+ Abort( $ERR_SYNTAX, "Cannot define interface $iface: already used in bonding definition $bond" );
+ }
+ }
+ else {
+ print $S->{'interface'}->{$iface} ."\n" ;
+ warn "$iface est definie dans S->{'interface'}\n" ;
+ Abort( $ERR_SYNTAX, "Cannot define interface $iface: already used in bonding definition $bond" );
+ }
}
}
}
@@ -1078,7 +1088,8 @@
$lan = $S->{'interface'}->{$i}->{$mnamindexnum} ;
}
elsif ( ! defined $S->{'interface'}->{$i}->{'default'} ) {
- Warn( $ERR_SYNTAX, "No default vlan defined for interface ".$i ) ;
+ Warn( $ERR_SYNTAX, "No default vlan defined for interface ".$i." skipping this interface for host $mnam" ) ;
+ next ;
}
else {
$lan = $S->{'interface'}->{$i}->{'default'} ;
@@ -1226,7 +1237,7 @@
if ( defined $S->{$i}->{$r}->{$mnamindexnum} ) {
$M->{$act}->{$j}->{$r} = $S->{$i}->{$r}->{$mnamindexnum} ;
} elsif ( ! defined $S->{$i}->{$r}->{'default'} ) {
- Abort ( $ERR_SYNTAX, "No default route defined for interface ".$i ) ;
+ Warn ( $ERR_SYNTAX, "No default route defined for interface ".$i." skipping this route for host $mnam" ) ;
} else {
$M->{$act}->{$j}->{$r} = $S->{$i}->{$r}->{'default'} ;
}
More information about the pf-tools-commits
mailing list