aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/etc
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2015-10-02 08:24:32 +0000
committerSteven Barth <steven@midlink.org>2015-10-02 08:24:32 +0000
commitd793f4b75bd93f8f24fbab206974c24f03b2e6a0 (patch)
treefa976a60f2656226faf12c0a1ce59862c9ca31fb /package/base-files/files/etc
parenta67cdea59649a6c3930de98117401afbb07455bb (diff)
downloadmaster-187ad058-d793f4b75bd93f8f24fbab206974c24f03b2e6a0.tar.gz
master-187ad058-d793f4b75bd93f8f24fbab206974c24f03b2e6a0.tar.bz2
master-187ad058-d793f4b75bd93f8f24fbab206974c24f03b2e6a0.zip
base-files: sanitize and unify $PATH
Previously init and hotplug paths were different from console. Signed-off-by: Steven Barth <steven@midlink.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47080 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/base-files/files/etc')
-rwxr-xr-xpackage/base-files/files/etc/preinit4
-rw-r--r--package/base-files/files/etc/profile2
2 files changed, 3 insertions, 3 deletions
diff --git a/package/base-files/files/etc/preinit b/package/base-files/files/etc/preinit
index 9cc8a9a8f6..31f861edf9 100755
--- a/package/base-files/files/etc/preinit
+++ b/package/base-files/files/etc/preinit
@@ -4,7 +4,7 @@
[ -z "$PREINIT" ] && exec /sbin/init
-export PATH=/bin:/sbin:/usr/bin:/usr/sbin
+export PATH=/usr/sbin:/usr/bin:/sbin:/bin
pi_ifname=
pi_ip=192.168.1.1
@@ -20,7 +20,7 @@ fs_failsafe_wait_timeout=2
pi_suppress_stderr="y"
pi_init_suppress_stderr="y"
-pi_init_path="/bin:/sbin:/usr/bin:/usr/sbin"
+pi_init_path="/usr/sbin:/usr/bin:/sbin:/bin"
pi_init_cmd="/sbin/init"
. /lib/functions.sh
diff --git a/package/base-files/files/etc/profile b/package/base-files/files/etc/profile
index 577b63b492..bd008a84d7 100644
--- a/package/base-files/files/etc/profile
+++ b/package/base-files/files/etc/profile
@@ -2,7 +2,7 @@
[ -f /etc/banner ] && cat /etc/banner
[ -e /tmp/.failsafe ] && cat /etc/banner.failsafe
-export PATH=/usr/bin:/usr/sbin:/bin:/sbin
+export PATH=/usr/sbin:/usr/bin:/sbin:/bin
export HOME=$(grep -e "^${USER:-root}:" /etc/passwd | cut -d ":" -f 6)
export HOME=${HOME:-/root}
export PS1='\u@\h:\w\$ '