Fixed. That's because during the bittorrent startup some temporary files
are created on the filesystems and then removed. So the evaluated speed
and the status resulted a negative value.

Cheers,
-Andrea

-------- Original Message --------
Subject: [systemimager-commits] r3585 - trunk/initrd_source/skel/etc/init.d
Date: Wed, 24 May 2006 03:24:36 -0500
From: Andrea Righi <[EMAIL PROTECTED]>
Reply-To: sisuite-devel@lists.sourceforge.net
To: [EMAIL PROTECTED]

Author: arighi
Date: 2006-05-24 03:24:36 -0500 (Wed, 24 May 2006)
New Revision: 3585

Modified:
   trunk/initrd_source/skel/etc/init.d/functions
Log:
fix: do not report negative values for speed and status

Modified: trunk/initrd_source/skel/etc/init.d/functions
===================================================================
--- trunk/initrd_source/skel/etc/init.d/functions       2006-05-23 22:01:34
UTC (rev 3584)
+++ trunk/initrd_source/skel/etc/init.d/functions       2006-05-24 08:24:36
UTC (rev 3585)
@@ -1568,11 +1568,12 @@

         # Evaluate bandwidth.
         speed=`echo "scale=2; (($TOT - $DISKSIZE) - $CURR_SIZE) /
$REPORT_INTERVAL" | bc`
+        speed=`echo "scale=2; if ($speed >= 0) { print $speed; } else {
print 0; }" | bc`

         # Evaluate status.
         CURR_SIZE=$(($TOT - $DISKSIZE))
         status=`echo "scale=2; $CURR_SIZE * 100 / $IMAGESIZE" | bc`
-        if [ `echo "scale=2; $status == 0" | bc` -eq 1 ]; then
+        if [ `echo "scale=2; $status <= 0" | bc` -eq 1 ]; then
             status=1
         elif [ `echo "scale=2; $status >= 100" | bc` -eq 1 ]; then
             status=99


Bernard Li wrote:
> Just now I was imaging a node with BitTorrent transport and for a split
> second (between initialization and imaging) I thought I saw the red
> "Installation failed" icon.
>  
> Just FYI, might want to keep an eye out for it next time you test.
>  
> Cheers,
>  
> Bernard


-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
Sisuite-devel mailing list
Sisuite-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sisuite-devel

Reply via email to