History log of /system/core/init/init_parser.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
a76baaabe56b98e23861e89722bd1425f92dbc2c 10-Jul-2013 Ken Sumrall <ksumrall@android.com> Add swapon_all to init's builtin commands

For enabling swap devices found in the fstab file

Change-Id: Iec4fd4d208df3d7a161a90d95f8606e8b516334a
/system/core/init/init_parser.c
2deedfe0b1ac86ebd62d19cf7da9e7dcb508ab09 29-Jan-2013 Colin Cross <ccross@android.com> init: switch property_get to use __system_property_get

Change-Id: I4fc0502a1a5b331087618a4d2e3d90948743d7bd
/system/core/init/init_parser.c
acef650dbc11355f9792923b69d8277a4ce89fab 21-May-2013 gcondra@google.com <gcondra@google.com> am 43329bc1: am 8a387870: Revert "Reload policy after setting up the data partition."

* commit '43329bc1c99c0f5f3670a8aaab39e54df34819a1':
Revert "Reload policy after setting up the data partition."
8a3878700eb9cd8ecf495cd01f15face5c3879c8 17-May-2013 repo sync <gcondra@google.com> Revert "Reload policy after setting up the data partition."

This reverts commit fee250d27a9c03af1ba439047b976d89563b1887.
/system/core/init/init_parser.c
efbe7fc6cc871e95760b9b01d674a09f7e80eb6a 01-May-2013 gcondra@google.com <gcondra@google.com> am 63577d92: am fee250d2: Reload policy after setting up the data partition.

* commit '63577d9280e7919bfb7221030d211b833e66bb1e':
Reload policy after setting up the data partition.
fee250d27a9c03af1ba439047b976d89563b1887 30-Apr-2013 repo sync <gcondra@google.com> Reload policy after setting up the data partition.

This forces a policy reload + fixcon to deal with dynamically
delivered policy changing labels on device nodes.

It's implemented as a new keyword in init.

Bug: 8702843
Change-Id: I803cf1ecf6ff8318ce25dcc5cda4f292adc9738c
/system/core/init/init_parser.c
ca8e66a8b0f843812014a28d49208f9f6f64ecbc 18-Apr-2013 Nick Kralevich <nnk@google.com> Make init handle reboots

Move the responsibility for rebooting the system from the
reboot command to init. Init is in a better position to take
actions to bring the system down cleanly, including making sure
filesystems are mounted read-only.

The only UIDs which can perform an init triggered reboot are
root, system, and shell.

Modify the reboot command so that it calls into init to perform
the reboot. The reboot command no longer requires CAP_SYS_BOOT.

Remove the -n reboot option and code which supports it. Anyone needing
to do an unclean shutdown can just do a 'echo c > /proc/sysrq-trigger'.

Modify adb so that it calls into init to perform a shutdown.

Bug: 8646621
Change-Id: I84c0513acb549720cb0e8c9fcbda0050f5c396f5
/system/core/init/init_parser.c
a5064626de3e46eed88534f728b01d17d2ae99b7 07-Mar-2013 Colin Cross <ccross@android.com> init: prevent action being added to the action_queue twice

Property triggers may cause an action to be queued twice, resulting
in a loop in the action queue. Keep actions that are not on the queue
in the list_empty state (act->qlist->next == act->qlist), and only
add them to the list if they are in that state.

Bug: 8335133
Change-Id: I3a3ec18176cf19cbaa3a45220a03c7560eacfe79
/system/core/init/init_parser.c
b5982bf7c65b30be981ecfe1847437b05e32b2bb 17-Oct-2012 Kenny Root <kroot@google.com> Remove HAVE_SELINUX guards

Change-Id: I8272c573b3c5dc663203bafab68fad5e94d89364
/system/core/init/init_parser.c
0e9dd90ac336278659477cad0b9e9f1004e2b338 18-Apr-2012 Ken Sumrall <ksumrall@android.com> Change init to use libfs_mgr to mount filesystems.

The new fs_mgr library moves much of the knowledge of what filesystems
to mount into a new fstab.<device> file, and just calls one function to
mount all the filesystems.

Change-Id: If3db37530a0676000cba3e679db27aca734227e5
/system/core/init/init_parser.c
e46f9d510db9351682cf17c49115110870147335 13-Jan-2012 Stephen Smalley <sds@tycho.nsa.gov> Extend init and ueventd for SE Android.

Add SE Android support for init and ueventd.

init:
- Load policy at boot.
- Set the security context for service daemons and their sockets.
- New built-in commands: setcon, setenforce, restorecon, setsebool.
- New option for services: seclabel.

ueventd:
- Set the security context for device directories and nodes.

Change-Id: I98ed752cde503c94d99dfa5b5a47e3c33db16aac
/system/core/init/init_parser.c
84bf9af758c84da7d9ff2929bce06bf2b2f239b8 20-Dec-2011 Dima Zavin <dima@android.com> init: use init's property expansion code for setprop/write

Change-Id: I3c284860cc8d5106ac2b086e62baeb6263873935
Signed-off-by: Dima Zavin <dima@android.com>
/system/core/init/init_parser.c
78a1b1fe1ab76964e35b4a4788238b197bfd613d 20-Dec-2011 Dima Zavin <dima@android.com> init: delay importing files until after parsing the current file

If we process the import directive inline, then the ordering of the
commands for the "on xxx" sections would be a little unexpected. The
init.rc files do not really have an implied order as to which section
appears and gets processed first. The init code itself provides that
ordering explicitly. For the user, the expectation is that if both the
current file and the imported file define a section (e.g. "on init"),
then the commands in the current file will be executed first, and then
the ones from the imported file(s).

The current implementation did not do that. It processed the import
directive inline, and thus the imported (i.e. dependent) files would
appear first in the command lists for the sections. This created
unintended side effects and the solution would have been to try and
put the import lines somewhere in the middle of the init file. This
would be difficult to notice and hard to extract the dependencies.

To solve this, we add the imports to a list for each file being parsed
and process the list after finishing parsing the file. This provides
predictable order for imports and provides a logical flow from the
user perspective: the currently parsed file gets to run its commands
before the files being imported.

Change-Id: I06dc35ff286314060e16b18923683cd2787269de
Signed-off-by: Dima Zavin <dima@android.com>
/system/core/init/init_parser.c
a6235eacf4b06b14b19125618d7aca570dbc02b0 16-Dec-2011 Dima Zavin <dima@android.com> init: allow init file imports to use properties in names

Adds new property syntax in init files during init file filename
expansion during the import command:
${prop.name}

So, one can do: import /init.${ro.hardware}.usb.rc

Should convert other usages of property names to use the new function.

Change-Id: I9205d7d7a2da620bc8e6b89ac0eb554fad53ded3
Signed-off-by: Dima Zavin <dima@android.com>
/system/core/init/init_parser.c
a286480f56012abdb4ef4ddab1c19a5c2316b7b8 27-Oct-2011 Ken Sumrall <ksumrall@android.com> Fix the class_reset command

The class_reset command used to reset services that had been set to
"disabled" in the init.rc file to a non-disabled state. Now, if the
service was originally set to "disabled", have the reset command set
it back to disabled. Otherwise, set it to the "reset" state as it
currently does.

Change-Id: I0c10582e46a8e443d4748d9d893ae762b19b653a
/system/core/init/init_parser.c
da04c52ab1036048520fca265cf02b61dca789e0 02-Sep-2011 Dima Zavin <dima@android.com> init/cutils: move list utility code to cutils from init

Change-Id: I357ceee813700297d8343159f22a07659e768d41
Signed-off-by: Dima Zavin <dima@android.com>
/system/core/init/init_parser.c
f5cb5b24356fae2dfa3477589ee0f3c094479e63 08-Jun-2011 Mike Lockwood <lockwood@android.com> init: Fix the init.rc import command

Change-Id: I8a91c3f7d1ca31e137d9043bb7f56e4a44fb63df
Signed-off-by: Mike Lockwood <lockwood@android.com>
/system/core/init/init_parser.c
7ba61b15ed11e168457270f20f5a80992756524a 08-Jun-2011 Mike Lockwood <lockwood@android.com> init: Allow wildcards in property triggers by using * for property value

For example, the following trigger will fire when the sys.foo property
is set to any value:

on property:sys.foo=*
write /data/foo hello

It is also possible to refer to the property within the trigger actions:

on property:sys.foo=*
write /data/foo $sys.foo

Change-Id: If78d20a532f77e17aa5703d53be581ad6736cbcf
Signed-off-by: Mike Lockwood <lockwood@android.com>
/system/core/init/init_parser.c
c5c51033c86353d1a448c72e0e9388906eed7114 09-Mar-2011 Ken Sumrall <ksumrall@android.com> Load the persistent properties after decrypting the /data partition

Fix for bug 3415286. The persistent properties are normally read early
in the boot process after /data is mounted. However, for an encrypted
system, at that point /data is a tmpfs ramdisk. This change adds a new
command to init (load_persist_props) to read the persistent properties,
and adds an action to init.rc to load the persistent properties. This
action is triggered by setting a property in vold, but that's in a
different CL.

Change-Id: I74b3057974ee6029c29d956b76fef5566700d471
/system/core/init/init_parser.c
203bad597fb4e46ddda051add28400070b5c3a5a 19-Jan-2011 Ken Sumrall <ksumrall@android.com> Add the commands rm and rmdir to init.

rm only removes a single non-directory directory entry (no -r support)
rmdir removes a single empty directory

Change-Id: I49702b02ba98a177027b126268c2c2846f968195
/system/core/init/init_parser.c
1be6968d9d51f43fdb00535708a6fed0be6bfbca 26-Dec-2010 Bruce Beare <bruce.j.beare@intel.com> init: Fix parser line numbering

Change-Id: I1ac481a2cef749b26c73bc9e6a212e6ace7a0ae2
/system/core/init/init_parser.c
752923c168009d03e9e00e590155fbd0a2880ccb 04-Dec-2010 Ken Sumrall <ksumrall@android.com> Changes to init to support encrypted filesystems.

These are the changes to init and init.rc necessary to
support booting with and encrypted /data filesystem.
A corresponding change to init.<device>.rc goes along
with this change.

Change-Id: I0c7e2cc39568358014a82e317735c0eae14dd683
/system/core/init/init_parser.c
d5c8ddfdf3f275226c02dc00ccbe63229acf6786 08-Dec-2010 Iliyan Malchev <malchev@google.com> Revert "Add "slow_start" keyword to init"

This reverts commit 50b3afd9f39619f69dc6f4efc29be88933eb3614.
/system/core/init/init_parser.c
50b3afd9f39619f69dc6f4efc29be88933eb3614 05-Dec-2010 Paul Eastham <eastham@google.com> Add "slow_start" keyword to init

This keyword will cause init to wait a few seconds before exec'ing
the target binary. Maybe only useful for hacks and debugging.

Change-Id: I85caa0bcbc0be7e48bd21eb9e31e039c0740c8d5
/system/core/init/init_parser.c
912ff85b035e0e6bc109812c1ea5661ea4df5967 01-Oct-2010 Mike Lockwood <lockwood@android.com> init: Add support for SOCK_SEQPACKET socket type

Change-Id: Ib264ecf9beb2685b070436d2bdec9655c7a31b47
Signed-off-by: Mike Lockwood <lockwood@android.com>
/system/core/init/init_parser.c
6310a8261c922533a692fb3e74ece2da98d4bafa 20-Apr-2010 Colin Cross <ccross@android.com> init: Split parser into generic parser and init parser

Change-Id: I451ebc4ff12f2ac660eb533fa10ad561fa25c9dd
/system/core/init/init_parser.c