OSDN Git Service
init: expand usage of property lookup and allow file lookup
Currently, the init.rc syntax ${prop.name} to substitute a value
looked up from the property service is only supported for the
setprop, write, and import commands. Here we generalize it so that
the arguments for all commands and services allow for references like
this.
We also introduce the syntax $[/path/to/file] to substitute the
contents of a file (typically a sysfs node), pruning any trailing
newlines from the file first.
Substitutions are always done at the last possible moment; right
when the command is executed or the service is started. If a service
is started/stopped multiple times, the substitutions will always be
re-done each time it starts.
If any substitition fails, the command will not run/service will not
start.
The deprecated syntax $prop.name is no longer supported.
Change-Id: I8560b70f48c0396832d9a7fadc546441e8e81ff9
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>