diff --git a/board/common/overlay/etc/init.d/conf b/board/common/overlay/etc/init.d/conf index 39abf427ae..dc71091fb9 100644 --- a/board/common/overlay/etc/init.d/conf +++ b/board/common/overlay/etc/init.d/conf @@ -4,6 +4,17 @@ _sys_conf="/etc/os.conf" _boot_conf="/boot/os.conf" _conf="/data/etc/os.conf" +if ! [ -d /data/etc ]; then + # use boot/system variants if we don't have the data partition mounted + if [ -f $_boot_conf ]; then + source $_boot_conf + elif [ -f $_sys_conf ]; then + source $_sys_conf + fi + + return +fi + if ! [ -f $_conf ]; then if [ -f $_boot_conf ]; then cp $_boot_conf $_conf @@ -12,5 +23,7 @@ if ! [ -f $_conf ]; then fi fi -source $_conf +if [ -f $_conf ]; then + source $_conf +fi