History log of /system/core/init/builtins.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
c3a4a054a99b62cb4fd593d95f3b2b0017202b20 20-Aug-2012 Jean-Baptiste Queru <jbq@google.com> am 3af04b71: am 7c386a61: Merge "Extend and document the "wait" command"

* commit '3af04b71e51e89af02a1fe526e4fc32dce0100d3':
Extend and document the "wait" command
7c386a610d9164c12932452d1ff671e070956ec1 20-Aug-2012 Jean-Baptiste Queru <jbq@google.com> Merge "Extend and document the "wait" command"
5c8574b51210be53efbb488965db0b8591c8d1cf 15-Aug-2012 Benoit Goby <benoit@android.com> init: Fix mkdir command when using ISUID or ISGID bit

On first boot, the directory is created with root:root ownership and
then chowned. chown clears the ISUID and ISGID bits, so we need to chmod
the directory again after chown.

Change-Id: I02dfe7a19a637678256b4e7cc09e6b5431e6f11e
/system/core/init/builtins.c
e50ac5f7771872331df70251d23d6bd8155da4a7 14-Aug-2012 Jeff Sharkey <jsharkey@android.com> Support shared-subtree and bind mount flags.

Bug: 6925012
Change-Id: Id8d887d17c6b1b2f90cfd1a1de991ccaba730b7d
/system/core/init/builtins.c
ef3f7fa32b451bd6f180c4c1586a98cee41aa296 08-Aug-2012 Jean-Baptiste Queru <jbq@google.com> Merge "Set the SELinux security label on new directories."
e096e36e50b4b66638ebc4d3c09c2ee35f538dfa 11-Jun-2012 Stephen Smalley <sds@tycho.nsa.gov> Set the SELinux security label on new directories.

Automatically set the SELinux security label on directories created
by init.rc. This avoids the need to separately call restorecon on
each such directory from the init.rc file. Also restorecon /dev
and /dev/socket after initial policy load so that they are labeled
correctly before any other dev nodes or sockets are created.

Change-Id: If6af6c4887cdead949737cebdd673957e9273ead
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
/system/core/init/builtins.c
96d0a4dda81aaff3f72b9690d88eb40387ee9630 04-Feb-2011 Patrick McCormick <patrickX.m.mccormick@intel.com> Extend and document the "wait" command

The wait command was currently implemented but
undocumented and only used internally. This change
adds a second option toi (optionally) override the default
timeout of 5 seconds.

The wait command can be used to wait for a file to appear
during the boot process, for example a disk or other device,
and is a better alternative than an unconditional sleep.

Change-Id: Ia11d8419c0ea84deec0e1bf5adfca5bc76ff38b7
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
/system/core/init/builtins.c
93574c619c96bec7e7e42468ce8573f630c78b21 29-Mar-2012 Benoit Goby <benoit@android.com> init: Fix chown and chmod for write-only files

Change-Id: I570b631ced11ab104aafe7ebfe71bae4e380d8af
/system/core/init/builtins.c
42a9349dc4e98019d27d7f8d19bc6c431695d7e1 20-Mar-2012 Geremy Condra <gcondra@google.com> init: make chmod/mkdir/chown not follow symlinks

This change brings init's do_chmod, mkdir, and do_chown into line
with open's O_NOFOLLOW semantics, causing them to fail when the
last element of their target path is a symlink.

Change-Id: If00e1a25cfe17ef6f738af4bf0541abd0c1b084b
/system/core/init/builtins.c
048cc27c8a6796f9b2ce9d58be8c423ab837cf8b 01-May-2012 Ken Sumrall <ksumrall@android.com> am 0e9dd90a: Change init to use libfs_mgr to mount filesystems.

* commit '0e9dd90ac336278659477cad0b9e9f1004e2b338':
Change init to use libfs_mgr to mount filesystems.
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/builtins.c
cf41769375f34dbf17de52df02e4881ecfee0c8b 27-Apr-2012 Colin Cross <ccross@android.com> am 64753635: am a02ff986: Merge "init: Add noexec mount option"

* commit '647536359f8ea63330805cb77abbf2f101952daa':
init: Add noexec mount option
b6ee25e3ad4cffa2b0f5bb734df4b503e1e367ba 14-Jul-2011 Lars Svensson <lars1.svensson@sonyericsson.com> init: Add noexec mount option

Change-Id: Ic13d66797a86d38432e79af0c3387ce986d0a19f
/system/core/init/builtins.c
58903013084b649fa81e9fd3310517d0e35e7c5d 29-Mar-2012 Benoit Goby <benoit@android.com> init: Fix chown and chmod for write-only files

Change-Id: I570b631ced11ab104aafe7ebfe71bae4e380d8af
/system/core/init/builtins.c
9ed1fe77322384552d7d9905ffc54c9681d3b73f 20-Mar-2012 Geremy Condra <gcondra@google.com> init: make chmod/mkdir/chown not follow symlinks

This change brings init's do_chmod, mkdir, and do_chown into line
with open's O_NOFOLLOW semantics, causing them to fail when the
last element of their target path is a symlink.

Change-Id: If00e1a25cfe17ef6f738af4bf0541abd0c1b084b
/system/core/init/builtins.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/builtins.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/builtins.c
8f91282ebe1963b9d27f8779ad1342302b293bd2 01-Sep-2011 Dima Zavin <dima@android.com> init/cutils: move kernel logging interface to libcutils from init

Change-Id: Ia0f91b1fcd6cae69d76bf3dd841340958db938a8
Signed-off-by: Dima Zavin <dima@android.com>
/system/core/init/builtins.c
27164dce5f0788476449057c978fa24e62245cb8 08-Jul-2011 Chia-chi Yeh <chiachi@android.com> init: make "mkdir" work even when the directory already exists.

This allows us to change permissions and ownerships of directories
in init scripts without adding additional commands.

Change-Id: I1815d6015953035251b98f28c0f3efd3c7f25f80
/system/core/init/builtins.c
1f0bd32f90161940d531040677099f32eef21fc4 09-Jun-2011 Mike Lockwood <lockwood@android.com> init: Add support for assigning system properties to system properties in init.rc

For example:
setprop sys.usb.config $persist.sys.usb.config

Change-Id: I7b4e1ed1335906b32621bd96a341b0f94bbee7f5
Signed-off-by: Mike Lockwood <lockwood@android.com>
/system/core/init/builtins.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/builtins.c
2c4d5dc41505d28cff369cfbe8b17ac81106d936 08-Jun-2011 Mike Lockwood <lockwood@android.com> init: Add support for writing system property value to a file in init.rc

The write command will write a property value if the value starts with a "$'

For example:
write /sys/class/android_usb/iSerial $ro.serialno

Use double leading '$' if you need to write a string that starts with '$':

write /data/foo $$hello

to write "$hello" to /data/foo

Change-Id: I55431ac7715a5347bb95c3a15aee97c575444dde
/system/core/init/builtins.c
7bc6e9ebe4783d5fbae17d7249cb80e997531598 27-May-2011 Ken Sumrall <ksumrall@android.com> Teach the mount command in init to not consider a wiped partition to be encrypted.

Change-Id: I3e989f0b81ec35084baddc04e014406f4d90ce04
/system/core/init/builtins.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/builtins.c
dd4d786cbf993a024fcd0f926fd40b90c8a08d51 18-Feb-2011 Ken Sumrall <ksumrall@android.com> Fix for bug 3379244, non-eMMC devices don't start all services.

Fix for non-eMMC based devices to properly start the "on nonencrypted"
action.

Change-Id: I5d2966db352b02f1a1724fb105e1cefc46037e42
/system/core/init/builtins.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/builtins.c
4e84d3bcf9af3452128fe2e8dc7607dff9016fac 14-Jan-2011 Ken Sumrall <ksumrall@android.com> Set a read-only property to indicate if the device is running encrypted.

The UI needs to know if the device is running with an encrypted
filesystem or now. So set a read-only property at boot to let it know.

Change-Id: I753de2d606c975bcbe9946d10fd47558cf357dac
/system/core/init/builtins.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/builtins.c
f83d0b9af5cbe4440cc41ceaa8a7806a13c86282 21-Apr-2010 Colin Cross <ccross@android.com> init: Move uevent handling to an external ueventd process

Change-Id: Iea6c56013062ade633a1754f7bcf8cf09b3dedc1
/system/core/init/builtins.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/builtins.c
cd0f173e2790ee068fd2a20bcfc6c20468e97e51 20-Apr-2010 Colin Cross <ccross@android.com> init: Add wait command and mount wait flag

Change-Id: I6b4c10f8f246095a7fb7342388ec4f6ff97d5733
/system/core/init/builtins.c
ed8a7d84428ec945c48b6b53dc5a3a18fabaf683 20-Apr-2010 Colin Cross <ccross@android.com> init: Move list and log handling to list.h and log.h

Change-Id: I298f575c590d0f28b7ad78747f3ebdbba56b7a27
/system/core/init/builtins.c
ebc6ff105a114ff5b5465e64fa0f3889730da19d 14-Apr-2010 Colin Cross <ccross@android.com> init: Handle commands in event queue loop

Change-Id: I679059dae43143f3c8f16b68de5694539b699e50
/system/core/init/builtins.c
3899e9fc01cf608f19f716749c54cc5c4d17e766 14-Apr-2010 Colin Cross <ccross@android.com> init: Move prototypes for util.c into util.h

Change-Id: I46a91849ce5297eb2597dd6134412f817564ec24
/system/core/init/builtins.c
ca7648ddfb46347c60014a849b0150a74df4e1d2 14-Apr-2010 Colin Cross <ccross@android.com> init: Move parser prototypes to parser.h

Change-Id: I31db51eb8e8a33a0bd06b41206bc9f9147d16d41
/system/core/init/builtins.c
4d0b21f4ac5908f695c9c0759c3a34511d8fd97b 30-Sep-2009 Tom Zhu <ling.zhu@motorola.com> am 4833d9f4: init: builtins: trancate target file in do_copy

Merge commit '4833d9f4986d6dafacff841beb3bf93172c84bdc' into eclair-plus-aosp

* commit '4833d9f4986d6dafacff841beb3bf93172c84bdc':
init: builtins: trancate target file in do_copy
4833d9f4986d6dafacff841beb3bf93172c84bdc 29-Sep-2009 Tom Zhu <ling.zhu@motorola.com> init: builtins: trancate target file in do_copy

add O_TRUNC flag in open(), which will truncate the target file,
otherwise, copy will keep the old content of the target file.

Signed-off-by: Tom Zhu <ling.zhu@motorola.com>
Signed-off-by: San Mehat <san@google.com>
/system/core/init/builtins.c
8c92ba1921fc8dc3fc7cc39ef854e9ee70fafc67 01-Sep-2009 Jean-Baptiste Queru <jbq@google.com> merge from open-source master
e7cb137f32fbc7caf97b80fac152b4bd3ac242cd 17-Nov-2008 Jay Freeman (saurik) <saurik@saurik.com> added chdir/chroot commands to init for mount switching/pivoting
/system/core/init/builtins.c
9f28bde9eb37e7d00df5c2a7c51d88dcd57cef7b 01-Dec-2008 Jay Freeman (saurik) <saurik@saurik.com> Trivial implementation of init's import command.
/system/core/init/builtins.c
7c44fe5925b6dd51166f73d30de0a2f22d66373e 27-Aug-2009 San Mehat <san@google.com> init: builtins: Add 'copy' command to init.rc parser

Signed-off-by: San Mehat <san@google.com>
/system/core/init/builtins.c
11e1c42df69b15c938aa1b7570e4370e6ab15a86 17-Nov-2008 Jay Freeman (saurik) <saurik@saurik.com> completed implementation of "trigger" for init
/system/core/init/builtins.c
96d58f4f521ee4c1fef58efe5c009f1ea523d67c 26-Jul-2009 Jean-Baptiste Queru <jbq@google.com> Merge korg/donut into korg/master
008abac082f1c098d402f944d9287dce67ffce0a 30-Jun-2009 Mike Chan <mike@android.com> init now returns proper error codes in dmesg for write command (init.rc)

Signed-off-by: Mike Chan <mike@android.com>
/system/core/init/builtins.c
8ad15685e6d3d2251ceac4ac7135397cf6140e1a 20-May-2009 San Mehat <san@google.com> resolved conflicts w/ f24e252903ca0f71c7fbfb135cf17e83e0c2ea90 merge...
f24e252903ca0f71c7fbfb135cf17e83e0c2ea90 19-May-2009 San Mehat <san@google.com> init: Add the ability to start services with dynamic arguments.

To add arguments dynamically to a service, start the service like so:

setprop ctl.start service_to_run:arg1 arg2 arg3...

To start a service with *no* dynamic arguments, start the service normally:

setprop ctl.start service_to_run

Dynamic arguments are only supported on 'oneshot' services

Signed-off-by: San Mehat <san@google.com>
/system/core/init/builtins.c
dd7bc3319deb2b77c5d07a51b7d6cd7e11b5beb0 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/system/core/init/builtins.c
e54eebbf1a908d65ee8cf80bab62821c05666d70 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/system/core/init/builtins.c
77d0c65b950570edd5241a8f2ebecfc3acbc5135 19-Dec-2008 Jean-Baptiste Queru <jbq@google.com> Merge commit 'remotes/korg/cupcake'

Conflicts:
init/devices.c
logwrapper/logwrapper.c
mountd/AutoMount.c
35237d135807af84bf9b0e5b8d7f8633e58db6f5 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
/system/core/init/builtins.c
e520d036165b36cf5c4cb305f9cec7d183977b61 20-Nov-2008 Jay Freeman (saurik) <saurik@saurik.com> Added support for loop@/path/to/filename to init's mount.

In keeping with the pattern of mtd@partition, I have added loop@path as a way to specify a loopback device. This way you can do things like mount directories in /system using cramfs from a file otherwise on /system (just one example oof how I'm using it). I specifically went with loop@ rather than adding this feature as a flag as the flags system is designed to set bits in the flags argument to mount: using loop@ fit the model in a much simpler manner and actually feels "correct".

This is a better version of the previously submitted 4045 that also refactors the mtd@ case. The reason for this is that I received comments that I should check for errors and return errors rather that do work in the case of success and fall through, but the mtd@ case wasn't doing that either and it became awkward to design the function so that it was half in one style of error handling and half in another. I also made certain to use inequality comparisons for Unix's -1 error returns rather than checking for -1, refactored my large if statement so as not to have danling parentheses, and disassocited the loop device on mount failure.
/system/core/init/builtins.c
4f6e8d7a00cbeda1e70cc15be9c4af1018bdad53 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
/system/core/init/builtins.c