mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
obuspa: Skip overriding of uci in case of firstboot
This commit is contained in:
parent
7f14f8634e
commit
f317c67aed
1 changed files with 8 additions and 3 deletions
|
|
@ -6,7 +6,7 @@ USE_PROCD=1
|
||||||
|
|
||||||
PROG=/usr/sbin/obuspa
|
PROG=/usr/sbin/obuspa
|
||||||
CONFIGURATION=obuspa
|
CONFIGURATION=obuspa
|
||||||
|
FIRST_BOOT="/etc/obuspa/boot_marker"
|
||||||
ENV_PROFILE="/root/.profile"
|
ENV_PROFILE="/root/.profile"
|
||||||
KEEP_FILE="/lib/upgrade/keep.d/obuspa"
|
KEEP_FILE="/lib/upgrade/keep.d/obuspa"
|
||||||
|
|
||||||
|
|
@ -871,6 +871,12 @@ sync_uci_with_db()
|
||||||
return 0;
|
return 0;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Skip overriding uci in case of Firstboot
|
||||||
|
if [ ! -f "${FIRST_BOOT}" ]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
log "Syncing obuspa uci with usp.db ...."
|
||||||
config_load obuspa
|
config_load obuspa
|
||||||
sync_db_controller
|
sync_db_controller
|
||||||
sync_db_localagent_mtp
|
sync_db_localagent_mtp
|
||||||
|
|
@ -978,7 +984,6 @@ db_init()
|
||||||
# Only do this if db have reasonable data
|
# Only do this if db have reasonable data
|
||||||
val="$(awk 'END{print NR}' ${DB_DUMP})"
|
val="$(awk 'END{print NR}' ${DB_DUMP})"
|
||||||
if [ "$val" -gt 15 ]; then
|
if [ "$val" -gt 15 ]; then
|
||||||
log "Syncing obuspa uci with usp.db ...."
|
|
||||||
sync_uci_with_db
|
sync_uci_with_db
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
@ -1026,6 +1031,7 @@ db_init()
|
||||||
cat ${CTRUST_RESET_FILE} >> ${RESET_FILE}
|
cat ${CTRUST_RESET_FILE} >> ${RESET_FILE}
|
||||||
rm ${CTRUST_RESET_FILE}
|
rm ${CTRUST_RESET_FILE}
|
||||||
fi
|
fi
|
||||||
|
[ -f "${FIRST_BOOT}" ] || touch "${FIRST_BOOT}"
|
||||||
}
|
}
|
||||||
|
|
||||||
start_service() {
|
start_service() {
|
||||||
|
|
@ -1043,7 +1049,6 @@ start_service() {
|
||||||
procd_set_param respawn \
|
procd_set_param respawn \
|
||||||
"${respawn_threshold:-10}" \
|
"${respawn_threshold:-10}" \
|
||||||
"${respawn_timeout:-10}" "${respawn_retry:-5}"
|
"${respawn_timeout:-10}" "${respawn_retry:-5}"
|
||||||
#procd_set_param limits core="unlimited"
|
|
||||||
fi
|
fi
|
||||||
procd_close_instance ${CONFIGURATION}
|
procd_close_instance ${CONFIGURATION}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue