How to autorun a script on startup(exec command not implemented in init.rc?)

by bord...@gmail.com » Thu, 12 May 2011 18:29:39 GMT


Sponsored Links
 Hi all:
    How to autorun a script to config network on startup.  I try to
use exec command in the init.rc, but it's not implemented yet?
The "do_exec" function in "builtins.c", it simply returns -1 without
doing anything.

Android version 2.2 (Froyo).
Kernel 2.6.32

-- 
Bian Jiang
 http://www.wifihack.net/ 
 http://golang-china.org/ 

-- 



Re: How to autorun a script on startup(exec command not implemented in init.rc?)

by hedwin » Sun, 15 May 2011 05:17:48 GMT


 service aName /aPath/aScript.sh
     oneschot

aName     - name you give to the service to run
aPath       - where the script is located
aScript.sh - your script to start the network stuff

Add this to your init,rc

Hedwin





-- 


Sponsored Links


Other Threads

1. Problems installing Android SDK - "no target available"

Searching the web led me to no solutions to my problem, but it did
lead me to this group.  And searching this group has turned out to be
fruitless for this particular problem, so I'm posting in hopes someone
can help me...


I'm a hobby programmer, but always enjoy a good challenge.  Since I'll
be picking up a Droid next week, I figured I'd play around with the
SDK a little.  So I downloaded Eclipse (RCP version, since that's one
of the two recommended on a site I found on android.com), downloaded
the 2.0 SDK, and unzipped both.  I started going through the
instructions to set up Eclipse to work with Android, and I'm getting
stuck at the point where I have to point Eclipse to the Android SDK.
When I'm in the preferences window, I choose Android - and at that
point, I need to point it towards the directory where the Tools
directory is, right?  So I tell it the SDK is in C:\androidsdk (for
example), then hit apply - just like the directions say.  And in the
window, it says "No Target Available."  I've been working on this for
a couple of hours now, trying to figure out what I'm doing wrong -
I've redownloaded the SDK, I've unzipped it to multiple places, I've
tried a few different versions of Eclipse... nothing.  No dice - every
time, still the same thing - no target available.


Has anyone else ever seen something like this?  I'm starting to get a
little frustrated with this whole thing, which is really not the way I
wanted to spend a Friday night after the kind of day I had at
work. :-)


Thanks in advance...


-CB

-- 

2. Transfer iTunes Amazon music video DVD movie to Motorola Droid CLIQ Rival

Any android phone users?  just thinking this article might be helpful

http://www.all-media-converter.com/knowledge/transfer-itunes-amazon-music-video-dvd-movie-to-motorola-droid-cliq-rival.html#136

--

3. Cannot get versionName when it set with string reference

4. Phoen application integration

5. NDK for SDK 2.0.1?

6. GLSurfaceView.Renderer render rate

7. Market Support Questions From Users/Buyers