summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChia-chi Yeh <chiachi@android.com>2011-07-08 16:52:18 -0700
committerChia-chi Yeh <chiachi@android.com>2011-07-08 16:52:18 -0700
commitea7441415997faf34f7ae44f462f916f5f7ea0df (patch)
tree980b238406a45bb8b850a90621fb68b9b6d10f44
parent27164dce5f0788476449057c978fa24e62245cb8 (diff)
downloadsystem_core-ea7441415997faf34f7ae44f462f916f5f7ea0df.zip
system_core-ea7441415997faf34f7ae44f462f916f5f7ea0df.tar.gz
system_core-ea7441415997faf34f7ae44f462f916f5f7ea0df.tar.bz2
init: clean up init.rc as now mkdir handles EEXIST.
Change-Id: I3fa2a618ef27197315fc128738a284ac644e86c0
-rw-r--r--rootdir/init.rc22
1 files changed, 4 insertions, 18 deletions
diff --git a/rootdir/init.rc b/rootdir/init.rc
index 42f049a..2cc81c6 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -115,11 +115,7 @@ on post-fs
chmod 0220 /proc/sysrq-trigger
# create the lost+found directories, so as to enforce our permissions
- mkdir /cache/lost+found 0770
-
- # double check the perms, in case lost+found already exists, and set owner
- chown root root /cache/lost+found
- chmod 0770 /cache/lost+found
+ mkdir /cache/lost+found 0770 root root
on post-fs-data
# We chown/chmod /data again so because mount is run as root + defaults
@@ -129,10 +125,7 @@ on post-fs-data
# Create dump dir and collect dumps.
# Do this before we mount cache so eventually we can use cache for
# storing dumps on platforms which do not have a dedicated dump partition.
-
- mkdir /data/dontpanic
- chown root log /data/dontpanic
- chmod 0750 /data/dontpanic
+ mkdir /data/dontpanic 0750 root log
# Collect apanic data, free resources and re-arm trigger
copy /proc/apanic_console /data/dontpanic/apanic_console
@@ -156,7 +149,6 @@ on post-fs-data
mkdir /data/misc/vpn/profiles 0770 system system
# give system access to wpa_supplicant.conf for backup and restore
mkdir /data/misc/wifi 0770 wifi wifi
- chmod 0770 /data/misc/wifi
chmod 0660 /data/misc/wifi/wpa_supplicant.conf
mkdir /data/local 0771 shell shell
mkdir /data/local/tmp 0771 shell shell
@@ -165,17 +157,11 @@ on post-fs-data
mkdir /data/app 0771 system system
mkdir /data/property 0700 root root
- # create dalvik-cache and double-check the perms
+ # create dalvik-cache, so as to enforce our permissions
mkdir /data/dalvik-cache 0771 system system
- chown system system /data/dalvik-cache
- chmod 0771 /data/dalvik-cache
# create the lost+found directories, so as to enforce our permissions
- mkdir /data/lost+found 0770
-
- # double check the perms, in case lost+found already exists, and set owner
- chown root root /data/lost+found
- chmod 0770 /data/lost+found
+ mkdir /data/lost+found 0770 root root
# create directory for DRM plug-ins
mkdir /data/drm 0774 drm drm