View Single Post
Posts: 1,808 | Thanked: 4,272 times | Joined on Feb 2011 @ Germany
#6
@ikerrg,

Very interesting analysis. I don't have /usr/sbin/maemo-optify-auto.sh (but I may have removed many Nokia packages). Could you please do "dpkg -S /usr/sbin/maemo-optify-auto.sh" to see from which package this thing is coming?

Furthermore, that way of checking space using stat seems quite broken.

$5 is the block size, but
$9 is the total number of inodes

so the dfree() function is mixing apples with bananas

It should either use df[*] or replace $9 with $8, which is the number "available blocks" ($9 is the number of "free blocks", don't know what the difference may be).

Plus I don't know why awk returns two values when multiplying. Seems that busybox is way beyond broken (I tested with latest busybox-power).
[*]
Code:
dfree()  
 {  
   space=`df -B 1 | tail -1 | awk '{ print $4 }' `  
   [ $? -ne 0 ] && return 0  
   return $space  
 }
Good luck.

PS: I do have (in my most "normal" N900) a /var/log/maemo-optify-boottime.log, last modified about 8 months ago. Nothing in the boot process seems to be touching it, so it must have come from some package that I have uninstalled.