mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-29 06:06:32 +00:00
init: fix conf script sourcing when no data partition available
This commit is contained in:
parent
5281a3dfe6
commit
cf57e4b483
@ -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
|
||||
|
||||
if [ -f $_conf ]; then
|
||||
source $_conf
|
||||
fi
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user