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. setContentView of a Custom View

Hello,

My current painting activity is built off of FingerPaint.java from the
API Demos. In my xml I declared the custom view, see below. When I
setContentView(view); everything works fine, but the problem is when I
setContentView(paint_layout.xml) it does not work properly.

///////////PaintActivity///////////
public class Paint extends PaintActivity implements
ColorPickerDialog.OnColorChangedListener {

     private Paint mPaint;
     private PaintView view;

     @Override
     protected void onCreate(Bundle savedInstanceState) {
     super.onCreate(savedInstanceState);
      view = new PaintView(this);
     setContentView(view);

     //Set mPaint code
     }

     public class PaintView extends View {
     //PaintView code
     }
//Paint code
}

///////////paint_layout.xml///////////
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/
android"
android:id="@+id/paint"
android:layout_width="fill_parent"
android:layout_height="fill_parent">

<com.myname.appname.PaintView
android:id="@+id/PaintView"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />

<!-- other buttons and text -->
</FrameLayout>

Can anyone inform me of why exactly? Am I missing an attribute for the
custom layout in the xml?

Thank you!

Matt.

-- 

2. Singapura --- Temannya Tablet Android

wah enak juga ya si robot punya temen cantik2........

*heheheee......




> 

3. How to determine which part of a file has been buffered?

4. Loading database file error after decrypting

5. Smooth Image Rotation with Gesture Control, UI Setup, Help

6. Set picture as wallpaper

7. Horay dapat juga doc to go full gratisan