Android启动脚本init.rc
2010-09-14 23:58:00 来源:WEB开发网the tail of a to-be-executed queue (unless it is already on the
queue).
Each action in the queue is dequeued in sequence and each command in
that action is executed in sequence. Init handles other activities
(device creation/destruction, property setting, process restarting)
"between" the execution of the commands in activities.
Actions take the form of:
on < trigger>
< command>
< command>
< command>
Services
--------
Services are programs which init launches and (optionally) restarts
when they exit. Services take the form of:
service < name> < pathname> [ < argument> ]*
< option>
< option>
...
Options
-------
Options are modifiers to services. They affect how and when init
runs the service.
critical
This is a device-critical service. If it exits more than four times in
four minutes, the device will reboot into recovery mode.
disabled
This service will not automatically start with its class.
It must be explicitly started by name.
setenv < name> < value>
Set the environment variable < name> to < value> in the launched process.
socket < name> < type> < perm> [ < user> [ < group> ] ]
Create a unix domain socket named /dev/socket/< name> and pass
its fd to the launched process. < type> must be "dgram" or "stream".
User and group default to 0.
user < username>
Change to username before exec'ing this service.
Currently defaults to root. (??? probably should default to nobody)
Currently, if your process requires linux capabilities then you cannot
更多精彩
赞助商链接