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'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"><<a href="mailto:timo.lindfors@iki.fi">timo.lindfors@iki.fi</a>></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">"Lucas Lacroix" <<a href="mailto:raijinsetsu@gmail.com">raijinsetsu@gmail.com</a>> writes:<br>
> I'm saddened by the fact that a phone that was supposed to be released to<br>
> the masses can have such a blatant failing. Not only can it NOT turn on when<br>
> the battery has little or no charge, the APM service does not turn the phone<br>
> off to prevent this (note: all OTHER phones I have ever used WILL turn off<br>
> 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>
# log battery info to stdout<br>
echo -n "`date -Iseconds` `date +%s`"<br>
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>
val="`cat $sys_battery/$i | sed 's/ /_/'`"<br>
echo -n " $val"<br>
done<br>
val="`cut -d' ' -f2 /proc/loadavg`"<br>
echo -n " $val"<br>
echo ""<br>
<br>
# workaround #1158<br>
if [ "`cat $sys_battery/capacity`" -lt 95 ]; then<br>
if [ "`cat $sys_battery/status`" = "Not charging" ]; then<br>
usbhost-start<br>
usbhost-stop<br>
fi<br>
fi<br>
<br>
# workaround #1712<br>
if [ "`cat $sys_battery/capacity`" -lt 4 ]; then<br>
if [ "`cat $sys_battery/status`" = "Not charging" ]; then<br>
sudo shutdown -h 1<br>
exit<br>
fi<br>
fi<br>
sleep 120<br>
done<br>
<div class="Ih2E3d"><br>
> On top of this, if I ever expect to have a working phone, I have to disable<br>
> the only feature which should extend the battery life (read that as:<br>
> OpenMoko has fixed the WSoD problem by replacing it with the BSoD - Black<br>
> Screen of Death).<br>
<br>
</div>Can't say much here. I have not seen either problem very often.<br>
<div class="Ih2E3d"><br>
> 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>