}
#------------------------------------------------
-# init_internal_log
+# clear_internal_log
#------------------------------------------------
-init_internal_log() {
+clear_internal_log() {
if [ -e "${INT_LOG_FILE}" ]; then
/bin/rm -fr "${INT_LOG_FILE}"
}
#------------------------------------------------
+# log boot info
+#------------------------------------------------
+function log_boot_info() {
+ CMDLINE_ROOT=$([[ $(</proc/cmdline) =~ (root=[^ ]*) ]]; echo ${BASH_REMATCH[1]})
+ CMDLINE_PARTITION_AB=$([[ $(</proc/cmdline) =~ (partition_ab=[ab]) ]]; echo ${BASH_REMATCH[1]})
+ CMDLINE_BOOTMODE=$([[ $(</proc/cmdline) =~ (bootmode=[^ ]*) ]]; echo ${BASH_REMATCH[1]})
+ log "[Info] Initrd-fota booting (/proc/cmdline $CMDLINE_BOOTMODE $CMDLINE_PARTITION_AB $CMDLINE_ROOT)"
+}
+
+#------------------------------------------------
# Main Routine Start
#------------------------------------------------
do_reboot
fi
+log_boot_info
+
if [ "${P_SLOT}" != "" ]
then
log "[Info] FOTA with A/B detected - skip RO update"
check_debug_mode
-init_internal_log
+clear_internal_log
check_for_rw_power_fail