pf-tools commit: r436 [parmelan-guest] - in /trunk: README.doc TODO debian/changelog debian/pf-tools.docs lib-net umlaunch

parmelan-guest at users.alioth.debian.org parmelan-guest at users.alioth.debian.org
Tue Feb 27 16:18:54 CET 2007


Author: parmelan-guest
Date: Tue Feb 27 16:18:53 2007
New Revision: 436

URL: http://svn.debian.org/wsvn/pf-tools/?sc=1&rev=436
Log:
pf-tools (0.32.46-1) unstable; urgency=low

  * lib-net, umlaunch: new (optional) "cmdline" directive (see README.doc for
    more information).
  * Use dh_installdocs to install the README* files.

 -- Thomas Parmelan <tom at sitadelle.com>  Tue, 27 Feb 2007 16:16:56 +0100


Added:
    trunk/debian/pf-tools.docs
Modified:
    trunk/README.doc
    trunk/TODO
    trunk/debian/changelog
    trunk/lib-net
    trunk/umlaunch

Modified: trunk/README.doc
URL: http://svn.debian.org/wsvn/pf-tools/trunk/README.doc?rev=436&op=diff
==============================================================================
--- trunk/README.doc (original)
+++ trunk/README.doc Tue Feb 27 16:18:53 2007
@@ -3,6 +3,29 @@
 TODO: translate/correct/update README.old.fr, then merge it here.
 TODO: use sgml, debiandoc, docbook or anything similar for the
       documentation.
+
+========================================================================
+private-network :
+
+* cmdline
+
+  [optional]
+
+  If defined, the value of this directive is added to the PXE configuration
+  file (and to the user-mode-linux command line).
+
+  Sample use :
+
+    To add "noapic" for all host%% servers, and also "pci=noirq" for host00,
+    you can do this :
+
+    [host%%]
+	...
+	cmdline.default	= noapic
+	cmdline.0	= noapic pci=noirq
+
+========================================================================
+update-* :
 
 * name_filter
 
@@ -12,10 +35,10 @@
 
   Sample use :
 
-  To install the correct linux-headers-`uname -r` package, you can do
-  this :
+    To install the correct linux-headers-`uname -r` package, you can do this :
 
     [linux-headers]
 	name_filter = echo %SECTIONNAME%-%OS_RELEASE%
 	action = apt-get
 
+

Modified: trunk/TODO
URL: http://svn.debian.org/wsvn/pf-tools/trunk/TODO?rev=436&op=diff
==============================================================================
--- trunk/TODO (original)
+++ trunk/TODO Tue Feb 27 16:18:53 2007
@@ -1,21 +1,24 @@
-/--Priorite: Basse/Normal/Urgent
-|/-Difficulte: Facile/Moyen/Difficile
+/--Priority: Low/Medium/Urgent
+|/-Difficulty: Easy/Medium/Hard
 ||
-UM convertir lib-* en packages, use strict et use warnings partout
-UD br0/trunk sur uml (2e couche bridge?)
+UM convert lib-* to real packages; use strict and use warnings everywhere
+UM use Net::IP for ipstart.* and check it is ok wrt the subnet declaration
+MM source = CVS:config/%HOST_TYPE%/%SECTIONNAME%
+LE Install everything in the correct directories (and ln -s for compatibility)
+
+UH br0/trunk sur uml (2e couche bridge?)
 NM Pouvoir spécifier si console série ou non dans private-network (ou ailleurs ?) (umlaunch + PXE)
 NM Pouvoir forcer une version particulière d'un paquet (apt-get install paquet=version)
 NM apc/serial/yasser dans private-network
 NM interface 0.0.0.0 promisc pour uml (ex: sondes)
 NM detection reutilisation disque autre machine (-> reinstall par defaut)
-ND conf nagios/rrdtool dans private-network
-ND mtu 1500 partout -> 1504 en trunk (tuntap > 1500?)
-BM umlshutdown
-ND Actions groupees (ex reload postfix)
+NH conf nagios/rrdtool dans private-network
+NH mtu 1500 partout -> 1504 en trunk (tuntap > 1500?)
+LM umlshutdown
+NH Actions groupees (ex reload postfix)
 NM #if et #define
-ND Variables dans private-network (ex %KERNEL_LVS%)
-ND Outils reseaux: Listes occupation vlans, graphes, detection libres contigues
-BF Installer tout ça dans les répertoires normaux au lieu de /usr/local/...
+NH Variables dans private-network (ex %KERNEL_LVS%)
+NH Outils reseaux: Listes occupation vlans, graphes, detection libres contigues
 
 Spécifique pf-host :
 

Modified: trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pf-tools/trunk/debian/changelog?rev=436&op=diff
==============================================================================
--- trunk/debian/changelog (original)
+++ trunk/debian/changelog Tue Feb 27 16:18:53 2007
@@ -1,3 +1,11 @@
+pf-tools (0.32.46-1) unstable; urgency=low
+
+  * lib-net, umlaunch: new (optional) "cmdline" directive (see README.doc for
+    more information).
+  * Use dh_installdocs to install the README* files.
+
+ -- Thomas Parmelan <tom at sitadelle.com>  Tue, 27 Feb 2007 16:16:56 +0100
+
 pf-tools (0.32.45-1) unstable; urgency=low
 
   * lib-conf: use `hostname -s` instead of just `hostname`. Suggested by

Added: trunk/debian/pf-tools.docs
URL: http://svn.debian.org/wsvn/pf-tools/trunk/debian/pf-tools.docs?rev=436&op=file
==============================================================================
--- trunk/debian/pf-tools.docs (added)
+++ trunk/debian/pf-tools.docs Tue Feb 27 16:18:53 2007
@@ -1,0 +1,4 @@
+README
+README.contributors
+README.doc
+README.old.fr

Modified: trunk/lib-net
URL: http://svn.debian.org/wsvn/pf-tools/trunk/lib-net?rev=436&op=diff
==============================================================================
--- trunk/lib-net (original)
+++ trunk/lib-net Tue Feb 27 16:18:53 2007
@@ -583,6 +583,30 @@
     return $st_initrd[7] / 1024;
 }
 
+sub Get_Cmdline ($$) {
+    my ( $Z, $host ) = @_;
+
+    my $host2 = $host;
+    $host2 =~ s/^(.+)\.$Z->{SOA}->{name}$/$1/;
+    $host2 =~ m/^([^.]+)(\.([^.]+))?$/;
+    my $hostshort = $1;
+    my $hostvlan  = $3;
+
+    if ( !defined $hostshort ) {
+        return undef;
+    }
+
+    my $hostclass = Host_class( $hostshort, $Z );
+    my $N = $Z->{SERVERS}->{BY_NAME}->{$hostclass};
+    my $M = $N->{SRVLIST}->{$hostshort};
+
+    if ( !defined($M) ) {
+        return undef;
+    }
+
+    return ( $M->{cmdline} );
+}
+
 sub Get_Active_Filename {
     my ( $Z, $host ) = @_;
 
@@ -892,6 +916,13 @@
 		# pour ne pas être obligé d'ajouter "initrd.default = initrd" à
 		# toutes les déclarations de serveurs dans private-network
 		$M->{initrd} = 'initrd';
+	    }
+
+	    if ( defined( $S->{cmdline}->{$mnamindexnum} ) ) {
+		$M->{cmdline} = $S->{cmdline}->{$mnamindexnum};
+	    }
+	    elsif ( defined( $S->{cmdline}->{default} ) ) {
+		$M->{cmdline} = $S->{cmdline}->{default};
 	    }
 
             # vrrp?
@@ -1420,6 +1451,10 @@
 
                         if ( $M->{initrd} ) {
 			    printf qq{# initrd "%s";\n}, $M->{initrd};
+                        }
+
+                        if ( $M->{cmdline} ) {
+			    printf qq{# cmdline "%s";\n}, $M->{cmdline};
                         }
 
                         if ( defined( $M->{pxefilename} )
@@ -1554,6 +1589,10 @@
 			    my $ramdisk_size = Get_Ramdisk_size_from_Initrd($M->{initrd});
 			    $temptemplatecontent =~
 			      s/%RAMDISK_SIZE%/$ramdisk_size/gs;
+			    my $cmdline = $M->{cmdline};
+			    if ($cmdline) {
+				$temptemplatecontent .= ' ' . $cmdline;
+			    }
                             print PXELINUXCFG $temptemplatecontent;
                             close(PXELINUXCFG);
                         }

Modified: trunk/umlaunch
URL: http://svn.debian.org/wsvn/pf-tools/trunk/umlaunch?rev=436&op=diff
==============================================================================
--- trunk/umlaunch (original)
+++ trunk/umlaunch Tue Feb 27 16:18:53 2007
@@ -175,6 +175,11 @@
     $cmdline .= " pfbcvs=" . $options->{branchecvs}
       if ( $options->{branchecvs} );
 
+    my $optcmdline = Get_Cmdline($Z, $host);
+    if ($optcmdline) {
+	$cmdline .= ' ' . $optcmdline;
+    }
+
     foreach my $nam ( sort { cmpif( $a, $b ) } keys %{$umif} ) {
         my $tapaddr;
         my @tapaddr;




More information about the Pf-tools-commits mailing list