From cc86fb2b29b13570ff416d4590a8cab705b19ec3 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Tue, 17 Mar 2015 20:01:13 -0700 Subject: [PATCH] Switch init over to _PATH_DEFPATH. Bug: 19564110 Change-Id: I343b4a360b10319dca13ab01f2d411ff940e9052 --- init/init.cpp | 3 +++ rootdir/init.environ.rc.in | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/init/init.cpp b/init/init.cpp index e0906209b..3c6e8a45f 100644 --- a/init/init.cpp +++ b/init/init.cpp @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -988,6 +989,8 @@ int main(int argc, char** argv) { // Clear the umask. umask(0); + add_environment("PATH", _PATH_DEFPATH); + // Get the basic filesystem setup we need put together in the initramdisk // on / and then we'll let the rc file figure out the rest. mkdir("/dev", 0755); diff --git a/rootdir/init.environ.rc.in b/rootdir/init.environ.rc.in index 30bef463d..0064790ad 100644 --- a/rootdir/init.environ.rc.in +++ b/rootdir/init.environ.rc.in @@ -1,6 +1,5 @@ # set up the global environment on init - export PATH /sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin export ANDROID_BOOTLOGO 1 export ANDROID_ROOT /system export ANDROID_ASSETS /system/app