diff --git a/init/readme.txt b/init/readme.txt index 7443330e7..4c8d0d348 100644 --- a/init/readme.txt +++ b/init/readme.txt @@ -137,32 +137,9 @@ boot Commands -------- -exec [ [ [ ]* ] ] -- [ ]* - Fork and execute command with the given arguments. The command starts - after "--" so that an optional security context, user, and supplementary - groups can be provided. No other commands will be run until this one - finishes. - -execonce [ ]* - Fork and execute a program (). This will block until - the program completes execution. This command can be run at most - once during init's lifetime. Subsequent invocations are ignored. - It is best to avoid execonce as unlike the builtin commands, it runs - the risk of getting init "stuck". - -export - Set the environment variable equal to in the - global environment (which will be inherited by all processes - started after this command is executed) - -ifup - Bring the network interface online. - -import - Parse an init config file, extending the current configuration. - -hostname - Set the host name. +bootchart_init + Start bootcharting if configured (see below). + This is included in the default init.rc. chmod Change file access permissions. @@ -175,9 +152,18 @@ class_start not already running. class_stop - Stop all services of the specified class if they are + Stop and disable all services of the specified class if they are currently running. +class_reset + Stop all services of the specified class if they are + currently running, without disabling them. They can be restarted + later using class_start. + +copy + Copies a file. Similar to write, but useful for binary/large + amounts of data. + domainname Set the domain name. @@ -190,9 +176,41 @@ enable on property:ro.boot.myfancyhardware=1 enable my_fancy_service_for_my_fancy_hardware +exec [ [ [ ]* ] ] -- [ ]* + Fork and execute command with the given arguments. The command starts + after "--" so that an optional security context, user, and supplementary + groups can be provided. No other commands will be run until this one + finishes. + +execonce [ ]* + Use exec instead. This command will be removed after existing callers have + moved to exec. + +export + Set the environment variable equal to in the + global environment (which will be inherited by all processes + started after this command is executed) + +hostname + Set the host name. + +ifup + Bring the network interface online. + +import + Parse an init config file, extending the current configuration. + insmod Install the module at +load_all_props + Loads properties from /system, /vendor, et cetera. + This is included in the default init.rc. + +load_persist_props + Loads persistent properties when /data has been decrypted. + This is included in the default init.rc. + loglevel Sets the kernel log level to level. Properties are expanded within . @@ -202,6 +220,9 @@ mkdir [mode] [owner] [group] owned by the root user and root group. If provided, the mode, owner and group will be updated if the directory exists already. +mount_all + Calls fs_mgr_mount_all on the given fs_mgr-format fstab. + mount [ ]* [] Attempt to mount the named device at the directory may be of the form mtd@name to specify a mtd block @@ -210,6 +231,13 @@ mount [ ]* [] include "barrier=1", "noauto_da_alloc", "discard", ... as a comma separated string, eg: barrier=1,noauto_da_alloc +powerctl + Internal implementation detail used to respond to changes to the + "sys.powerctl" system property, used to implement rebooting. + +restart + Like stop, but doesn't disable the service. + restorecon [ ]* Restore the file named by to the security context specified in the file_contexts configuration. @@ -220,6 +248,14 @@ restorecon_recursive [ ]* Recursively restore the directory tree named by to the security contexts specified in the file_contexts configuration. +rm + Calls unlink(2) on the given path. You might want to + use "exec -- rm ..." instead (provided the system partition is + already mounted). + +rmdir + Calls rmdir(2) on the given path. + setcon Set the current process security context to the specified string. This is typically only used from early-init to set the init context @@ -238,6 +274,9 @@ start stop Stop a service from running if it is currently running. +swapon_all + Calls fs_mgr_swapon_all on the given fstab file. + symlink Create a symbolic link at with the value @@ -248,10 +287,18 @@ trigger Trigger an event. Used to queue an action from another action. +verity_load_state + Internal implementation detail used to load dm-verity state. + +verity_update_state + Internal implementation detail used to update dm-verity state and + set the partition..verified properties used by adb remount + because fs_mgr can't set them directly itself. + wait [ ] - Poll for the existence of the given file and return when found, - or the timeout has been reached. If timeout is not specified it - currently defaults to five seconds. + Poll for the existence of the given file and return when found, + or the timeout has been reached. If timeout is not specified it + currently defaults to five seconds. write Open the file at and write a string to it with write(2).