parted 1.8.1 (perhaps older versions as well) place a space before the  
partition number when printing partitions.  As such, the current  
regular expression will never set $end_of_last_partition_on_disk to a  
non-zero value, resulting in a perl illegal division by zero error  
when running `si_prepareclient' with the `--unit %' switch.  This  
patch simply allows there to be whitespace before the first digit.   
Patch applied to SystemImager 4.1.6.

$ svn diff
Index: lib/SystemImager/Common.pm
===================================================================
--- lib/SystemImager/Common.pm  (revision 4469)
+++ lib/SystemImager/Common.pm  (working copy)
@@ -504,7 +504,7 @@
              #
              my $end_of_last_partition_on_disk = 0;
              foreach (@partition_tool_output) {
-                if (/^\d+\s+/) {
+                if (/^\s*\d+\s+/) {

                      my($minor_junk, $start_junk,  
$end_of_this_partition) = split;


-- 
Greg Fiumara
(301) 975-3891
Image Group - NIST
gregory.fium...@nist.gov


------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
sisuite-devel mailing list
sisuite-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sisuite-devel

Reply via email to