Hi,<br><br>Can you tell me how you make this script to load on start-up. I think its a good choice to make. I&#39;m with qtopia distro.<br><br>Thanks<br clear="all">--<br>Marc Rios<br><br>Nota: <a href="http://www.gnu.org/philosophy/no-word-attachments.es.html">http://www.gnu.org/philosophy/no-word-attachments.es.html</a><br>

<br><br><div class="gmail_quote">On Sun, Jan 4, 2009 at 6:16 PM, Timo Juhani Lindfors <span dir="ltr">&lt;<a href="mailto:timo.lindfors@iki.fi">timo.lindfors@iki.fi</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">&quot;Lucas Lacroix&quot; &lt;<a href="mailto:raijinsetsu@gmail.com">raijinsetsu@gmail.com</a>&gt; writes:<br>
&gt; I&#39;m saddened by the fact that a phone that was supposed to be released to<br>
&gt; the masses can have such a blatant failing. Not only can it NOT turn on when<br>
&gt; the battery has little or no charge, the APM service does not turn the phone<br>
&gt; off to prevent this (note: all OTHER phones I have ever used WILL turn off<br>
&gt; when the battery gets below some critical level).<br>
<br>
</div>I use a simple shell script to shutdown the phone in one minute if it<br>
is not charging and the capacity is less than 4%.<br>
<br>
<br>
#!/bin/sh<br>
set -e<br>
. $HOME/.sysfsrc<br>
<br>
while true; do<br>
 &nbsp; &nbsp;# log battery info to stdout<br>
 &nbsp; &nbsp;echo -n &quot;`date -Iseconds` `date +%s`&quot;<br>
 &nbsp; &nbsp;for i in type status voltage_now current_now charge_full temp technology present time_to_empty_now time_to_full_now capacity online; do<br>
 &nbsp; &nbsp; &nbsp; &nbsp;val=&quot;`cat $sys_battery/$i | sed &#39;s/ /_/&#39;`&quot;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;echo -n &quot; $val&quot;<br>
 &nbsp; &nbsp;done<br>
 &nbsp; &nbsp;val=&quot;`cut -d&#39; &#39; -f2 /proc/loadavg`&quot;<br>
 &nbsp; &nbsp;echo -n &quot; $val&quot;<br>
 &nbsp; &nbsp;echo &quot;&quot;<br>
<br>
 &nbsp; &nbsp;# workaround #1158<br>
 &nbsp; &nbsp;if [ &quot;`cat $sys_battery/capacity`&quot; -lt 95 ]; then<br>
 &nbsp; &nbsp; &nbsp; &nbsp;if [ &quot;`cat $sys_battery/status`&quot; = &quot;Not charging&quot; ]; then<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;usbhost-start<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;usbhost-stop<br>
 &nbsp; &nbsp; &nbsp; &nbsp;fi<br>
 &nbsp; &nbsp;fi<br>
<br>
 &nbsp; &nbsp;# workaround #1712<br>
 &nbsp; &nbsp;if [ &quot;`cat $sys_battery/capacity`&quot; -lt 4 ]; then<br>
 &nbsp; &nbsp; &nbsp; &nbsp;if [ &quot;`cat $sys_battery/status`&quot; = &quot;Not charging&quot; ]; then<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sudo shutdown -h 1<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;exit<br>
 &nbsp; &nbsp; &nbsp; &nbsp;fi<br>
 &nbsp; &nbsp;fi<br>
 &nbsp; &nbsp;sleep 120<br>
done<br>
<div class="Ih2E3d"><br>
&gt; On top of this, if I ever expect to have a working phone, I have to disable<br>
&gt; the only feature which should extend the battery life (read that as:<br>
&gt; OpenMoko has fixed the WSoD problem by replacing it with the BSoD - Black<br>
&gt; Screen of Death).<br>
<br>
</div>Can&#39;t say much here. I have not seen either problem very often.<br>
<div class="Ih2E3d"><br>
&gt; work with this battery. Lastly, I do not have a second battery.<br>
<br>
</div>Try to find somebody else who has a freerunner and borrow a battery<br>
for a while?<br>
<div><div></div><div class="Wj3C7c"><br>
<br>
<br>
_______________________________________________<br>
support mailing list<br>
<a href="mailto:support@lists.openmoko.org">support@lists.openmoko.org</a><br>
<a href="https://lists.openmoko.org/mailman/listinfo/support" target="_blank">https://lists.openmoko.org/mailman/listinfo/support</a><br>
</div></div></blockquote></div><br>