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 root
> # oneshot
> And my.sh is very simple:
> #!/system/bin/sh
> echo "Executing my.sh"
> lsmod
> ************
> Any ideas what could be missing?
by default Androids init redirects stdout and stderr to /dev/null,
therefore you won't see the output of this script. to see if the
service is executed you could make it create a file. also remove the
dot before the script name, it will probably work but you shouldn't
rely on init having / as working directory. and uncomment the oneshot
attribute, otherwise your script will be executed continuously
regards
--
Matthias Kaehlcke
Embedded Linux Developer
Amsterdam
La posibilidad de realizar un suenyo es lo
que hace que la vida sea interesante
.''`.
using free software / Debian GNU/Linux | http://debian.org : :' :
`. `'`
gpg --keyserver pgp.mit.edu --recv-keys 47D8E5D4 `-
--
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting