View Single Post
Old 06-19-2009, 11:59 AM   #29
porkupan
Fanatic
porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.porkupan ought to be getting tired of karma fortunes by now.
 
porkupan's Avatar
 
Posts: 556
Karma: 1057213
Join Date: Sep 2006
Location: North Eastern U.S.
Device: Sony Reader
Quote:
Originally Posted by glyph View Post
Every script I try booting with says it fails.

but it always fails, can someone point a noob in the right direction?
Well, if you are really a noob, maybe you shouldn't be playing with the device you can rather easily brick?

Make sure the scripts follow a certain convention (I pretty sure not all of it is needed, perhaps only the first and the last lines, but it's better to be on the safe side, right?):

Code:
#!/bin/sh

_FUNCTIONS=/etc/rc.d/functions
[ -f ${_FUNCTIONS} ] && . ${_FUNCTIONS}

update_percent_complete()
{
    _PERCENT_COMPLETE=$((${_PERCENT_COMPLETE} + $1))
    update_progressbar ${_PERCENT_COMPLETE}
}

update_percent_complete 2

<do your stuff here>

update_progressbar 100

return 0
The first line tells the OS this script has to be run by shell. Make sure you save the file as a UNIX text (with UNIX line feeds, not Windows/DOS CR/LF). If you don't, the shell script will not be executed.
porkupan is offline   Reply With Quote