Hi all,

I solved it. It seems you have to specify the class, otherwise it is in the 
class "default". In your init.rc, there are only statements for class_start 
core and class_start main. So you have to specifiy the class and add (if 
needed) an appropriate class_start statement.



On Wednesday, August 1, 2012 9:12:13 AM UTC+2, Pieter wrote:
>
> Hi all,
>
> I am trying to call a script at boot time.  The script is available inside 
> /system/sbin, but it seems it is not executed.
>
> Here are the details.
> In my init.<target>.rc:
>
> service sampleservice /system/bin/sh /system/sbin/samplescript.sh
>      user root
>      oneshot
>
> The script itself:
> #!/system/bin/sh
> echo The sample script works!
> echo "The sample script works!" > /data/misc/samplescript
>
> The permissions of /system/sbin/samplescript.sh are as follows: -rw-r--r-- 
>    
>
> Doing from command line "sh /system/sbin/samplescript.sh" works perfectly, 
> but it seems the script is not executed at boot time. There are no entries 
> in /data/misc/samplescript
>
> * How can I resolve this issue? Where should I see the output of the 
> "echo" command? Is there another/better way to have it printed in logcat or 
> dmesg?
> * The script itself is not executable. Does this matter and if yes, how do 
> I have to make it executable? In my original directory it is executable, 
> but somehow during the copy process (with PRODUCT_LOCAL_COPY) the 
> executable rights disappear.
> * Another option I see is that I did not "register" a service as such 
> (e.b. by specifiying "LOCAL_MODULE" in your Android.mk and mention it in 
> core.mk) and perhaps this is just not the right way to call a sh script 
> at boot time?
>
> Any help is more than welcome!
> Best regards,
> Pieter
>

-- 
unsubscribe: android-kernel+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-kernel

Reply via email to