Attached is a patch to fix the image master script since we updated the version for parted.  When I found the bug, the DISK_SIZE variable was something like 8000MB and we need to take out the "MB" for the remaining code to work.  My patch will also take out KB, GB, TB, PB, etc...
 
Cheers,
 
Bernard
Index: lib/SystemImager/Server.pm
===================================================================
--- lib/SystemImager/Server.pm  (revision 3245)
+++ lib/SystemImager/Server.pm  (working copy)
@@ -471,7 +471,7 @@
         print $out "$cmd\n\n";
 
         print $out "# Get the size of the destination disk so that we can make 
the partitions fit properly.\n";
-        print $out qq(DISK_SIZE=`parted -s $devfs_dev print ) . q(| grep 'Disk 
geometry for' | sed 's/^.*-//g' | sed 's/\..*$//' `) . qq(\n);
+        print $out qq(DISK_SIZE=`parted -s $devfs_dev print ) . q(| grep 'Disk 
geometry for' | sed 's/^.*-//g' | sed 's/\..*$//' | sed 's/.B//' `) . qq(\n);
         print $out q([ -z $DISK_SIZE ] && shellout) . qq(\n);
 
         print $out q(if [ "$ARCH" = "alpha" ]; then) . qq(\n); 

Reply via email to