View Single Post
peterleinchen's Avatar
Posts: 4,118 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#387
Hey iDont,

so it looks like I am late for a small glitch report.
'stat' of bb-power returns values in a different order than stock 'stat' and gives out an empty new line at the end.
optify scripts rely on stock bb and so bail out with
2013-06-28 09:40:26 :: not enough free space in /home (need at least 200 MB free), quitting.
in /var/log/maemo-optify-boottime.log.

Not that anybody noticed before, or it is needed at all after first optification (and more over NOkia returned size of optfs in MB with a sh return, so it was/is erroneous and bailed out nevertheless often), but I wanted to get rid of those error messages/logs.
Attached are my changes, so you may think of a small sed command in postinst/postrm or not. It is up to you.
Maybe someone experienced with CSSU may know some more about those optification scripts?

Here are the difffs for auto
Code:
~ $ diff /usr/sbin/maemo-optify-auto-opt.sh  /usr/sbin/maemo-optify-auto-opt___
sh.ori 
--- /usr/sbin/maemo-optify-auto-opt.sh
+++ /usr/sbin/maemo-optify-auto-opt___sh.ori
@@ -142,11 +142,7 @@
 fi
 
 dfree "/home"
-#peterleinchen
-log "peterleinchen, ?: $?, space: $space"
-#if [ $? -lt $HOME_SPACE_LIMIT ]
-if [ $space -lt $HOME_SPACE_LIMIT ]
-#pl end
+if [ $? -lt $HOME_SPACE_LIMIT ]
 then
   log "not enough free space in /home (need at least $HOME_SPACE_LIMIT MB free), quitting."
   return 0
and for lib
Code:
~ $ diff /usr/sbin/maemo-optify-lib.sh /usr/sbin/maemo-optify-lib___sh.ori 
--- /usr/sbin/maemo-optify-lib.sh
+++ /usr/sbin/maemo-optify-lib___sh.ori
@@ -9,17 +9,8 @@
 # returns: the amount of free space in MB
 dfree()
 {
-  #peterleinchen, for busybox-power
-  if [ "$(readlink /usr/sbin/watchdog)" == "/bin/busybox" ]; then
-    #power busybox
-    space=`/bin/busybox stat -ft /home | /bin/busybox awk '{print int($5*$8/(1024*1024)) }' | head -1`
-  else
-    #standard busybox
-    space=`/bin/busybox stat -ft /home | /bin/busybox awk '{print int($5*$9/(1024*1024)) }'`
-  fi
-  #pl end
+  space=`/bin/busybox stat -ft /home | /bin/busybox awk '{print int($5*$9/(1024*1024)) }'`
   [ $? -ne 0 ] && return 0
-  #OMG this will return just 0 to 255
   return $space
 }
__________________
SIM-Switcher, automated SIM switching with a Double (Dual) SIM adapter
--
Thank you all for voting me into the Community Council 2014-2016!

Please consider your membership / supporting Maemo e.V. and help to spread this by following/copying this link to your TMO signature:
[MC eV] Maemo Community eV membership application, http://talk.maemo.org/showthread.php?t=94257

editsignature, http://talk.maemo.org/profile.php?do=editsignature
 

The Following 7 Users Say Thank You to peterleinchen For This Useful Post: