[Fai-commit] r4629 - people/michael/features/setup_harddisks_2/implementation

andreas at alioth.debian.org andreas at alioth.debian.org
Thu Oct 18 14:26:05 UTC 2007


Author: andreas
Date: 2007-10-18 14:26:05 +0000 (Thu, 18 Oct 2007)
New Revision: 4629

Modified:
   people/michael/features/setup_harddisks_2/implementation/shdd2-commands
   people/michael/features/setup_harddisks_2/implementation/shdd2-parser
Log:
no zeroing out anymore, but porper removal of lvm sigatures

Modified: people/michael/features/setup_harddisks_2/implementation/shdd2-commands
===================================================================
--- people/michael/features/setup_harddisks_2/implementation/shdd2-commands	2007-10-18 10:31:23 UTC (rev 4628)
+++ people/michael/features/setup_harddisks_2/implementation/shdd2-commands	2007-10-18 14:26:05 UTC (rev 4629)
@@ -162,12 +162,16 @@
     my( $devices_aref ) = @_;
       # first remove the dm_mod module to prevent ghost lvm volumes 
       # from existing
-      push @FAI::commands, "modprobe -r dm_mod";
+#      push @FAI::commands, "modprobe -r dm_mod";
       # zero out (broken?) lvm signatures
-      push @FAI::commands, "dd if=/dev/zero of=$_ bs=1 count=1"
-        foreach ( @{$devices_aref} );
+#      push @FAI::commands, "dd if=/dev/zero of=$_ bs=1 count=1"
+#        foreach ( @{$devices_aref} );
+    my $device_list = join(" ", (@{$devices_aref}) );
+    ( $FAI::debug > 0 ) and print "list of erased devices: $device_list\n"; 
+    push @FAI::commands, "pvremove -ff -y $device_list";
+
       # reload module
-      push @FAI::commands, "modprobe dm_mod";
+#      push @FAI::commands, "modprobe dm_mod";
 
 }
 

Modified: people/michael/features/setup_harddisks_2/implementation/shdd2-parser
===================================================================
--- people/michael/features/setup_harddisks_2/implementation/shdd2-parser	2007-10-18 10:31:23 UTC (rev 4628)
+++ people/michael/features/setup_harddisks_2/implementation/shdd2-parser	2007-10-18 14:26:05 UTC (rev 4629)
@@ -360,23 +360,23 @@
   {
     if ( $2 eq "k" )
     {
-      $val *= ( 1 / 1024 );
+      $val = $1 ( 1 / 1024 );
     }
     elsif ( $2 eq "M" )
     {
-      $val *= 1;
+      $val = $1;
     }
     elsif ( $2 eq "G" )
     {
-      $val *= 1024;
+      $val = $1 * 1024;
     }
     elsif ( $2 eq "T" )
     {
-      $val *= ( 1024 * 1024 );
+      $val = $1 * ( 1024 * 1024 );
     }
     elsif ( $2 eq "P" )
     {
-      $val *= ( 1024 * 1024 * 1024 );
+      $val = $1 * ( 1024 * 1024 * 1024 );
     }
   }
   return $val;




More information about the Fai-commit mailing list