mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-29 06:06:32 +00:00
Merge remote-tracking branch 'thingos/feature-boot-conf' into thingos-next
This commit is contained in:
commit
8516de7d4c
@ -31,7 +31,7 @@ case "$1" in
|
|||||||
mount_fs
|
mount_fs
|
||||||
|
|
||||||
# we need to source conf again, now that /data is available
|
# we need to source conf again, now that /data is available
|
||||||
test -n "${OS_DEBUG}" || source /etc/init.d/os_conf
|
source /etc/init.d/os_conf
|
||||||
test "${OS_DEBUG}" == "true" && remount_rw
|
test "${OS_DEBUG}" == "true" && remount_rw
|
||||||
mk_tty_login
|
mk_tty_login
|
||||||
;;
|
;;
|
||||||
|
@ -1,21 +1,21 @@
|
|||||||
|
|
||||||
sys_conf="/etc/os.conf"
|
SYS_CONF="/etc/os.conf"
|
||||||
boot_conf="/boot/os.conf"
|
BOOT_CONF="/boot/os.conf"
|
||||||
data_conf="/data/etc/os.conf"
|
DATA_CONF="/data/etc/os.conf"
|
||||||
|
|
||||||
|
|
||||||
# source in all conf files in order of precedence
|
# source in all conf files in order of precedence
|
||||||
if [[ -f ${sys_conf} ]]; then
|
if [[ -f ${SYS_CONF} ]]; then
|
||||||
source ${sys_conf}
|
source ${SYS_CONF}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -f ${data_conf} ]]; then
|
if [[ -f ${DATA_CONF} ]]; then
|
||||||
source ${data_conf}
|
source ${DATA_CONF}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -f ${boot_conf} ]]; then
|
if [[ -f ${BOOT_CONF} ]]; then
|
||||||
source ${boot_conf}
|
source ${BOOT_CONF}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
unset sys_conf boot_conf data_conf
|
unset SYS_CONF BOOT_CONF DATA_CONF
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
boot_log=/var/log/boot.log
|
BOOT_LOG=/var/log/boot.log
|
||||||
pid_file=/tmp/rc.pid
|
PID_FILE=/tmp/rc.pid
|
||||||
|
|
||||||
source /etc/init.d/base
|
source /etc/init.d/base
|
||||||
|
|
||||||
echo "---- shutting down ${OS_NAME} ${OS_VERSION} ----" >> ${boot_log}
|
echo "---- shutting down ${OS_NAME} ${OS_VERSION} ----" >> ${BOOT_LOG}
|
||||||
|
|
||||||
# stop all init scripts in /etc/init.d,
|
# stop all init scripts in /etc/init.d,
|
||||||
# executing them in reverse numerical order.
|
# executing them in reverse numerical order.
|
||||||
@ -13,9 +13,9 @@ echo "---- shutting down ${OS_NAME} ${OS_VERSION} ----" >> ${boot_log}
|
|||||||
if ! [[ -x "${i}" ]]; then continue; fi
|
if ! [[ -x "${i}" ]]; then continue; fi
|
||||||
if [[ -f /data/etc/no_$(basename ${i}) ]]; then continue; fi
|
if [[ -f /data/etc/no_$(basename ${i}) ]]; then continue; fi
|
||||||
${i} stop
|
${i} stop
|
||||||
done& echo $! > ${pid_file}) | tee -a ${boot_log} &
|
done& echo $! > ${PID_FILE}) | tee -a ${BOOT_LOG} &
|
||||||
|
|
||||||
pid=$(cat ${pid_file})
|
pid=$(cat ${PID_FILE})
|
||||||
while kill -0 ${pid} 2>/dev/null; do
|
while kill -0 ${pid} 2>/dev/null; do
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
boot_log=/var/log/boot.log
|
BOOT_LOG=/var/log/boot.log
|
||||||
tmp_boot_log=/tmp/_boot.log
|
TMP_BOOT_LOG=/tmp/_boot.log
|
||||||
pid_file=/tmp/rc.pid
|
PID_FILE=/tmp/rc.pid
|
||||||
|
|
||||||
|
|
||||||
source /etc/init.d/base
|
source /etc/init.d/base
|
||||||
|
|
||||||
echo "---- booting ${OS_NAME} ${OS_VERSION} ----" >> ${tmp_boot_log}
|
echo "---- booting ${OS_NAME} ${OS_VERSION} ----" >> ${TMP_BOOT_LOG}
|
||||||
|
|
||||||
# start all init scripts in /etc/init.d,
|
# start all init scripts in /etc/init.d,
|
||||||
# executing them in numerical order.
|
# executing them in numerical order.
|
||||||
@ -14,12 +15,12 @@ echo "---- booting ${OS_NAME} ${OS_VERSION} ----" >> ${tmp_boot_log}
|
|||||||
if ! [[ -x "${i}" ]]; then continue; fi
|
if ! [[ -x "${i}" ]]; then continue; fi
|
||||||
if [[ -f /data/etc/no_$(basename ${i}) ]]; then continue; fi
|
if [[ -f /data/etc/no_$(basename ${i}) ]]; then continue; fi
|
||||||
${i} start || break
|
${i} start || break
|
||||||
done& echo $! > ${pid_file}) | tee -a ${tmp_boot_log} &
|
done& echo $! > ${PID_FILE}) | tee -a ${TMP_BOOT_LOG} &
|
||||||
|
|
||||||
pid=$(cat ${pid_file})
|
pid=$(cat ${PID_FILE})
|
||||||
while kill -0 ${pid} 2>/dev/null; do
|
while kill -0 ${pid} 2>/dev/null; do
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
|
||||||
test -d $(dirname ${boot_log}) && cat ${tmp_boot_log} >> ${boot_log}
|
test -d $(dirname ${BOOT_LOG}) && cat ${TMP_BOOT_LOG} >> ${BOOT_LOG}
|
||||||
|
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
link_watch="true"
|
LINK_WATCH="true"
|
||||||
link_watch_timeout=20
|
LINK_WATCH_TIMEOUT=20
|
||||||
|
|
||||||
ip_watch="true"
|
IP_WATCH="true"
|
||||||
ip_watch_timeout=40
|
IP_WATCH_TIMEOUT=40
|
||||||
|
|
||||||
#netwatch_host=www.google.com
|
#NETWATCH_HOST=www.google.com
|
||||||
#netwatch_port=80
|
#NETWATCH_PORT=80
|
||||||
netwatch_retries=3
|
NETWATCH_RETRIES=3
|
||||||
netwatch_timeout=5
|
NETWATCH_TIMEOUT=5
|
||||||
netwatch_interval=20
|
NETWATCH_INTERVAL=20
|
||||||
|
|
||||||
#MEYEWATCH_DISABLE="true"
|
#MEYEWATCH_DISABLE="true"
|
||||||
meyewatch_timeout=120
|
meyewatch_timeout=120
|
||||||
|
Loading…
x
Reference in New Issue
Block a user