Merge remote-tracking branch 'thingos/feature-boot-conf' into thingos-next

This commit is contained in:
Calin Crisan 2019-01-13 11:05:33 +02:00
commit 8516de7d4c
5 changed files with 33 additions and 32 deletions

View File

@ -31,7 +31,7 @@ case "$1" in
mount_fs
# 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
mk_tty_login
;;

View File

@ -1,21 +1,21 @@
sys_conf="/etc/os.conf"
boot_conf="/boot/os.conf"
data_conf="/data/etc/os.conf"
SYS_CONF="/etc/os.conf"
BOOT_CONF="/boot/os.conf"
DATA_CONF="/data/etc/os.conf"
# source in all conf files in order of precedence
if [[ -f ${sys_conf} ]]; then
source ${sys_conf}
if [[ -f ${SYS_CONF} ]]; then
source ${SYS_CONF}
fi
if [[ -f ${data_conf} ]]; then
source ${data_conf}
if [[ -f ${DATA_CONF} ]]; then
source ${DATA_CONF}
fi
if [[ -f ${boot_conf} ]]; then
source ${boot_conf}
if [[ -f ${BOOT_CONF} ]]; then
source ${BOOT_CONF}
fi
unset sys_conf boot_conf data_conf
unset SYS_CONF BOOT_CONF DATA_CONF

View File

@ -1,11 +1,11 @@
#!/bin/sh
boot_log=/var/log/boot.log
pid_file=/tmp/rc.pid
BOOT_LOG=/var/log/boot.log
PID_FILE=/tmp/rc.pid
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,
# 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 [[ -f /data/etc/no_$(basename ${i}) ]]; then continue; fi
${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
sleep 1
done

View File

@ -1,12 +1,13 @@
#!/bin/sh
boot_log=/var/log/boot.log
tmp_boot_log=/tmp/_boot.log
pid_file=/tmp/rc.pid
BOOT_LOG=/var/log/boot.log
TMP_BOOT_LOG=/tmp/_boot.log
PID_FILE=/tmp/rc.pid
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,
# 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 [[ -f /data/etc/no_$(basename ${i}) ]]; then continue; fi
${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
sleep 1
done
test -d $(dirname ${boot_log}) && cat ${tmp_boot_log} >> ${boot_log}
test -d $(dirname ${BOOT_LOG}) && cat ${TMP_BOOT_LOG} >> ${BOOT_LOG}

View File

@ -1,14 +1,14 @@
link_watch="true"
link_watch_timeout=20
LINK_WATCH="true"
LINK_WATCH_TIMEOUT=20
ip_watch="true"
ip_watch_timeout=40
IP_WATCH="true"
IP_WATCH_TIMEOUT=40
#netwatch_host=www.google.com
#netwatch_port=80
netwatch_retries=3
netwatch_timeout=5
netwatch_interval=20
#NETWATCH_HOST=www.google.com
#NETWATCH_PORT=80
NETWATCH_RETRIES=3
NETWATCH_TIMEOUT=5
NETWATCH_INTERVAL=20
#MEYEWATCH_DISABLE="true"
meyewatch_timeout=120