diff --git a/board/common/overlay/etc/init.d/rcS b/board/common/overlay/etc/init.d/rcS index 20c2ce1cd5..f8f6f2aa2b 100755 --- a/board/common/overlay/etc/init.d/rcS +++ b/board/common/overlay/etc/init.d/rcS @@ -4,6 +4,11 @@ BOOT_LOG=/var/log/boot.log TMP_BOOT_LOG=/tmp/_boot.log PID_FILE=/tmp/rc.pid +set -a +test -f /etc/environment && source /etc/environment +test -f /data/etc/environment && source /data/etc/environment +test -f /boot/etc/environment && source /boot/etc/environment +set +a source /etc/init.d/base diff --git a/board/common/overlay/etc/profile b/board/common/overlay/etc/profile index 189f73c23f..f56cf28154 100644 --- a/board/common/overlay/etc/profile +++ b/board/common/overlay/etc/profile @@ -27,6 +27,11 @@ if [ "$PS1" ]; then export TERM=linux fi; -if [ -f /data/etc/profile ]; then - source /data/etc/profile -fi +# custom local profile +test -f /data/etc/profile && source /data/etc/profile + +# global environment variables +test -f /etc/environment && source /etc/environment +test -f /data/etc/environment && source /data/etc/environment +test -f /boot/etc/environment && source /boot/etc/environment +