Re: [android-porting] running a script from init.rc

2012-04-29 Thread Matthias Kaehlcke
El Tue, Apr 24, 2012 at 05:46:39PM -0700 HV ha dit: Hi All, I'm trying to initiate a script as a service from init.rc (running ICS), but it doesn't seem to work. Here is what I have: service my_sh /system/bin/sh ./system/etc/my.sh user root group

Re: [android-porting] running a script from init.rc

2012-04-26 Thread Chris Stratton
On Wednesday, April 25, 2012 2:59:01 PM UTC-4, HV wrote: With this, I do see the service kicking in. The next challenge is how do I get the script to work. Say if I want to cd /mnt/sdcard this should show up in the shell prompt. Is that doable? In other words, it should work exactly as

Re: [android-porting] running a script from init.rc

2012-04-26 Thread HV
I wanted the commands that I'm running from within the script get translated on to the console. But, I guess that's not possible On Thursday, April 26, 2012 12:18:35 PM UTC-7, Chris Stratton wrote: On Wednesday, April 25, 2012 2:59:01 PM UTC-4, HV wrote: With this, I do see the service

Re: [android-porting] running a script from init.rc

2012-04-26 Thread Chris Stratton
On Thursday, April 26, 2012 3:28:57 PM UTC-4, HV wrote: I wanted the commands that I'm running from within the script get translated on to the console. But, I guess that's not possible That depends on what you mean by translated and console - neither term matches very well with the

Re: [android-porting] running a script from init.rc

2012-04-25 Thread sathish kumar
follow how debuggerd service is called. it will work. and add oneshot On Wed, Apr 25, 2012 at 6:16 AM, HV harishv.athr...@gmail.com wrote: Hi All, I'm trying to initiate a script as a service from init.rc (running ICS), but it doesn't seem to work. Here is what I have:

Re: [android-porting] running a script from init.rc

2012-04-25 Thread HV
Hi Kumar, debuggerd is an executable, but what i'm trying to run is a script, so it's not exactly the same Thanks HV On Tuesday, April 24, 2012 11:35:27 PM UTC-7, kumar wrote: follow how debuggerd service is called. it will work. and add oneshot On Wed, Apr 25, 2012 at 6:16 AM, HV

Re: [android-porting] running a script from init.rc

2012-04-25 Thread Harish V
Hi Matthias, Thanks for your response. I got the syntax sorted out now: service my_sh /system/etc/my_sh.sh class main #user root #group root oneshot With this, I do see the service kicking in. The next challenge is how do I get the script to work. Say if I want to cd

[android-porting] running a script from init.rc

2012-04-24 Thread HV
Hi All, I'm trying to initiate a script as a service from init.rc (running ICS), but it doesn't seem to work. Here is what I have: service my_sh /system/bin/sh ./system/etc/my.sh user root group root #oneshot And my.sh is very simple: #!/system/bin/sh echo Executing