From bd778170479aaf80a4f6398e106f86b75ecfa966 Mon Sep 17 00:00:00 2001 From: NareshM1702 Date: Mon, 9 Feb 2026 11:38:20 +0530 Subject: [PATCH 01/20] RDKB-63406:Devicetype RFC default value is not migrating after software upgrade --- source/scripts/init/system/utopia_init_xb6.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/source/scripts/init/system/utopia_init_xb6.sh b/source/scripts/init/system/utopia_init_xb6.sh index f21e3c78..d9f7f87d 100755 --- a/source/scripts/init/system/utopia_init_xb6.sh +++ b/source/scripts/init/system/utopia_init_xb6.sh @@ -409,6 +409,23 @@ else echo "SSH: Forward SSH changed to disabled" >> $Log_file fi +#Change devicetype on firmware udgrade +DEVICETYPE_MIGRATE="$(syscfg get devicetype_migrate)" +echo "$DEVICETYPE_MIGRATE" +if [ -z "$DEVICETYPE_MIGRATE" ]; then + CURRENT_DEVICETYPE="$(syscfg get DeviceType)" + echo "$CURRENT_DEVICETYPE" + if [ "$CURRENT_DEVICETYPE" != "PROD" ]; then + echo "setting DeviceType to PROD" + syscfg set DeviceType "PROD" + syscfg commit + else + echo "DeviceType is already PROD, no change needed" + fi + syscfg set devicetype_migrate "1" + syscfg commit +fi + #IGMP PROXY Disbaling on migration IGMP_MIGRATE="`syscfg get igmp_migrate`" if [ -z "$IGMP_MIGRATE" ]; then From b215b4cd20fbeb3d0399bae7379d7029baa03ee9 Mon Sep 17 00:00:00 2001 From: NareshM1702 Date: Mon, 9 Feb 2026 11:39:59 +0530 Subject: [PATCH 02/20] RDKB-63406:Devicetype RFC default value is not migrating after software upgrade --- source/scripts/init/system/utopia_init_hub4.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/source/scripts/init/system/utopia_init_hub4.sh b/source/scripts/init/system/utopia_init_hub4.sh index 9239aa45..aa3485b5 100755 --- a/source/scripts/init/system/utopia_init_hub4.sh +++ b/source/scripts/init/system/utopia_init_hub4.sh @@ -204,6 +204,23 @@ if [ "$SYSCFG_LAN_DOMAIN" == "utopia.net" ]; then syscfg commit fi +#Change devicetype on firmware udgrade +DEVICETYPE_MIGRATE="$(syscfg get devicetype_migrate)" +echo "$DEVICETYPE_MIGRATE" +if [ -z "$DEVICETYPE_MIGRATE" ]; then + CURRENT_DEVICETYPE="$(syscfg get DeviceType)" + echo "$CURRENT_DEVICETYPE" + if [ "$CURRENT_DEVICETYPE" != "PROD" ]; then + echo "setting DeviceType to PROD" + syscfg set DeviceType "PROD" + syscfg commit + else + echo "DeviceType is already PROD, no change needed" + fi + syscfg set devicetype_migrate "1" + syscfg commit +fi + #Hard Factory reset from mount-fs.sh if [ `cat /data/HFRES_UTOPIA` -eq 1 ]; then syscfg set $FACTORY_RESET_KEY $FACTORY_RESET_RGWIFI From 75ec9d79b6a32b756c474019f00be190b25f628b Mon Sep 17 00:00:00 2001 From: NareshM1702 Date: Thu, 12 Feb 2026 11:48:30 +0530 Subject: [PATCH 03/20] Update utopia_init_xb6.sh --- source/scripts/init/system/utopia_init_xb6.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/scripts/init/system/utopia_init_xb6.sh b/source/scripts/init/system/utopia_init_xb6.sh index d9f7f87d..ba4d0700 100755 --- a/source/scripts/init/system/utopia_init_xb6.sh +++ b/source/scripts/init/system/utopia_init_xb6.sh @@ -414,7 +414,7 @@ DEVICETYPE_MIGRATE="$(syscfg get devicetype_migrate)" echo "$DEVICETYPE_MIGRATE" if [ -z "$DEVICETYPE_MIGRATE" ]; then CURRENT_DEVICETYPE="$(syscfg get DeviceType)" - echo "$CURRENT_DEVICETYPE" + echo "[Utopia] Devicetype is $CURRENT_DEVICETYPE" if [ "$CURRENT_DEVICETYPE" != "PROD" ]; then echo "setting DeviceType to PROD" syscfg set DeviceType "PROD" From a903762e41bdc10c2dd4f6b614e6d0300095fdd7 Mon Sep 17 00:00:00 2001 From: NareshM1702 Date: Thu, 12 Feb 2026 11:49:30 +0530 Subject: [PATCH 04/20] Update utopia_init_hub4.sh --- source/scripts/init/system/utopia_init_hub4.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/scripts/init/system/utopia_init_hub4.sh b/source/scripts/init/system/utopia_init_hub4.sh index aa3485b5..9a85b201 100755 --- a/source/scripts/init/system/utopia_init_hub4.sh +++ b/source/scripts/init/system/utopia_init_hub4.sh @@ -209,7 +209,7 @@ DEVICETYPE_MIGRATE="$(syscfg get devicetype_migrate)" echo "$DEVICETYPE_MIGRATE" if [ -z "$DEVICETYPE_MIGRATE" ]; then CURRENT_DEVICETYPE="$(syscfg get DeviceType)" - echo "$CURRENT_DEVICETYPE" + echo "[utopia] Devicetype is $CURRENT_DEVICETYPE" if [ "$CURRENT_DEVICETYPE" != "PROD" ]; then echo "setting DeviceType to PROD" syscfg set DeviceType "PROD" From a01e6b40eb4d46c61688af33d34644435388ad74 Mon Sep 17 00:00:00 2001 From: NareshM1702 Date: Thu, 12 Feb 2026 14:48:37 +0530 Subject: [PATCH 05/20] Update utopia_init.sh --- source/scripts/init/system/utopia_init.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/source/scripts/init/system/utopia_init.sh b/source/scripts/init/system/utopia_init.sh index fca35332..e3f21581 100755 --- a/source/scripts/init/system/utopia_init.sh +++ b/source/scripts/init/system/utopia_init.sh @@ -262,6 +262,23 @@ if [ "$SYSCFG_LAN_DOMAIN" == "utopia.net" ]; then syscfg commit fi +#Change devicetype on firmware udgrade +DEVICETYPE_MIGRATE="$(syscfg get devicetype_migrate)" +echo "$DEVICETYPE_MIGRATE" +if [ -z "$DEVICETYPE_MIGRATE" ]; then + CURRENT_DEVICETYPE="$(syscfg get DeviceType)" + echo "[utopia] Devicetype is $CURRENT_DEVICETYPE" + if [ "$CURRENT_DEVICETYPE" != "PROD" ]; then + echo "setting DeviceType to PROD" + syscfg set DeviceType "PROD" + syscfg commit + else + echo "DeviceType is already PROD, no change needed" + fi + syscfg set devicetype_migrate "1" + syscfg commit +fi + if [ -f $SYSCFG_OLDBKUP_FILE ];then rm -rf $SYSCFG_OLDBKUP_FILE fi From b3d0f5864153d33473c72cd7c0f6b03d335fc86a Mon Sep 17 00:00:00 2001 From: NareshM1702 Date: Fri, 13 Feb 2026 13:07:22 +0530 Subject: [PATCH 06/20] Update utopia_init.sh --- source/scripts/init/system/utopia_init.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/source/scripts/init/system/utopia_init.sh b/source/scripts/init/system/utopia_init.sh index e3f21581..2a5f4144 100755 --- a/source/scripts/init/system/utopia_init.sh +++ b/source/scripts/init/system/utopia_init.sh @@ -264,14 +264,12 @@ fi #Change devicetype on firmware udgrade DEVICETYPE_MIGRATE="$(syscfg get devicetype_migrate)" -echo "$DEVICETYPE_MIGRATE" if [ -z "$DEVICETYPE_MIGRATE" ]; then CURRENT_DEVICETYPE="$(syscfg get DeviceType)" echo "[utopia] Devicetype is $CURRENT_DEVICETYPE" if [ "$CURRENT_DEVICETYPE" != "PROD" ]; then echo "setting DeviceType to PROD" syscfg set DeviceType "PROD" - syscfg commit else echo "DeviceType is already PROD, no change needed" fi From 23570815bd2583d65e3662760153e42bb4341220 Mon Sep 17 00:00:00 2001 From: NareshM1702 Date: Fri, 13 Feb 2026 13:07:57 +0530 Subject: [PATCH 07/20] Update utopia_init_xb6.sh --- source/scripts/init/system/utopia_init_xb6.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/source/scripts/init/system/utopia_init_xb6.sh b/source/scripts/init/system/utopia_init_xb6.sh index ba4d0700..e729433e 100755 --- a/source/scripts/init/system/utopia_init_xb6.sh +++ b/source/scripts/init/system/utopia_init_xb6.sh @@ -411,14 +411,12 @@ fi #Change devicetype on firmware udgrade DEVICETYPE_MIGRATE="$(syscfg get devicetype_migrate)" -echo "$DEVICETYPE_MIGRATE" if [ -z "$DEVICETYPE_MIGRATE" ]; then CURRENT_DEVICETYPE="$(syscfg get DeviceType)" echo "[Utopia] Devicetype is $CURRENT_DEVICETYPE" if [ "$CURRENT_DEVICETYPE" != "PROD" ]; then echo "setting DeviceType to PROD" syscfg set DeviceType "PROD" - syscfg commit else echo "DeviceType is already PROD, no change needed" fi From 7ad8dca4a05cb76499bfb897c35e1c2cd4ebb6e8 Mon Sep 17 00:00:00 2001 From: NareshM1702 Date: Fri, 13 Feb 2026 13:08:42 +0530 Subject: [PATCH 08/20] Update utopia_init_hub4.sh --- source/scripts/init/system/utopia_init_hub4.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/source/scripts/init/system/utopia_init_hub4.sh b/source/scripts/init/system/utopia_init_hub4.sh index 9a85b201..11d9bc9a 100755 --- a/source/scripts/init/system/utopia_init_hub4.sh +++ b/source/scripts/init/system/utopia_init_hub4.sh @@ -206,14 +206,12 @@ fi #Change devicetype on firmware udgrade DEVICETYPE_MIGRATE="$(syscfg get devicetype_migrate)" -echo "$DEVICETYPE_MIGRATE" if [ -z "$DEVICETYPE_MIGRATE" ]; then CURRENT_DEVICETYPE="$(syscfg get DeviceType)" echo "[utopia] Devicetype is $CURRENT_DEVICETYPE" if [ "$CURRENT_DEVICETYPE" != "PROD" ]; then echo "setting DeviceType to PROD" syscfg set DeviceType "PROD" - syscfg commit else echo "DeviceType is already PROD, no change needed" fi From cbb9cb57dc11a13b9c94ba1dd9142c4859787488 Mon Sep 17 00:00:00 2001 From: NareshM1702 Date: Mon, 23 Feb 2026 11:32:22 +0530 Subject: [PATCH 09/20] Update source/scripts/init/system/utopia_init.sh Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- source/scripts/init/system/utopia_init.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/scripts/init/system/utopia_init.sh b/source/scripts/init/system/utopia_init.sh index 2a5f4144..700ecbda 100755 --- a/source/scripts/init/system/utopia_init.sh +++ b/source/scripts/init/system/utopia_init.sh @@ -262,7 +262,7 @@ if [ "$SYSCFG_LAN_DOMAIN" == "utopia.net" ]; then syscfg commit fi -#Change devicetype on firmware udgrade +#Change devicetype on firmware upgrade DEVICETYPE_MIGRATE="$(syscfg get devicetype_migrate)" if [ -z "$DEVICETYPE_MIGRATE" ]; then CURRENT_DEVICETYPE="$(syscfg get DeviceType)" From f1e2dde5180f4824ab4354b99b0b0a55266ff037 Mon Sep 17 00:00:00 2001 From: NareshM1702 Date: Mon, 23 Feb 2026 11:51:30 +0530 Subject: [PATCH 10/20] Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- source/scripts/init/system/utopia_init_hub4.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/scripts/init/system/utopia_init_hub4.sh b/source/scripts/init/system/utopia_init_hub4.sh index 11d9bc9a..55b59e5d 100755 --- a/source/scripts/init/system/utopia_init_hub4.sh +++ b/source/scripts/init/system/utopia_init_hub4.sh @@ -204,7 +204,7 @@ if [ "$SYSCFG_LAN_DOMAIN" == "utopia.net" ]; then syscfg commit fi -#Change devicetype on firmware udgrade +# Change device type on firmware upgrade DEVICETYPE_MIGRATE="$(syscfg get devicetype_migrate)" if [ -z "$DEVICETYPE_MIGRATE" ]; then CURRENT_DEVICETYPE="$(syscfg get DeviceType)" From e79a1c145f23d8f0f1dc209ec858caf66a5ef291 Mon Sep 17 00:00:00 2001 From: NareshM1702 Date: Mon, 23 Feb 2026 11:52:02 +0530 Subject: [PATCH 11/20] Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- source/scripts/init/system/utopia_init_xb6.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/scripts/init/system/utopia_init_xb6.sh b/source/scripts/init/system/utopia_init_xb6.sh index e729433e..e1ec0210 100755 --- a/source/scripts/init/system/utopia_init_xb6.sh +++ b/source/scripts/init/system/utopia_init_xb6.sh @@ -409,7 +409,7 @@ else echo "SSH: Forward SSH changed to disabled" >> $Log_file fi -#Change devicetype on firmware udgrade +# Change device type on firmware upgrade DEVICETYPE_MIGRATE="$(syscfg get devicetype_migrate)" if [ -z "$DEVICETYPE_MIGRATE" ]; then CURRENT_DEVICETYPE="$(syscfg get DeviceType)" From b98bbad5f3034a698817f36ae4bbfdc28701f529 Mon Sep 17 00:00:00 2001 From: NareshM1702 Date: Mon, 23 Feb 2026 12:17:23 +0530 Subject: [PATCH 12/20] Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- source/scripts/init/system/utopia_init.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/scripts/init/system/utopia_init.sh b/source/scripts/init/system/utopia_init.sh index 700ecbda..a966f079 100755 --- a/source/scripts/init/system/utopia_init.sh +++ b/source/scripts/init/system/utopia_init.sh @@ -266,12 +266,12 @@ fi DEVICETYPE_MIGRATE="$(syscfg get devicetype_migrate)" if [ -z "$DEVICETYPE_MIGRATE" ]; then CURRENT_DEVICETYPE="$(syscfg get DeviceType)" - echo "[utopia] Devicetype is $CURRENT_DEVICETYPE" + echo_t "[utopia][init] Devicetype is $CURRENT_DEVICETYPE" if [ "$CURRENT_DEVICETYPE" != "PROD" ]; then - echo "setting DeviceType to PROD" + echo_t "[utopia][init] setting DeviceType to PROD" syscfg set DeviceType "PROD" else - echo "DeviceType is already PROD, no change needed" + echo_t "[utopia][init] DeviceType is already PROD, no change needed" fi syscfg set devicetype_migrate "1" syscfg commit From ceb3f0699e8546a03c30dcd3a5715f335b9f53dc Mon Sep 17 00:00:00 2001 From: NareshM1702 Date: Mon, 23 Feb 2026 12:26:54 +0530 Subject: [PATCH 13/20] fixing spacing --- source/scripts/init/system/utopia_init.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/source/scripts/init/system/utopia_init.sh b/source/scripts/init/system/utopia_init.sh index a966f079..db1b4c16 100755 --- a/source/scripts/init/system/utopia_init.sh +++ b/source/scripts/init/system/utopia_init.sh @@ -265,16 +265,16 @@ fi #Change devicetype on firmware upgrade DEVICETYPE_MIGRATE="$(syscfg get devicetype_migrate)" if [ -z "$DEVICETYPE_MIGRATE" ]; then - CURRENT_DEVICETYPE="$(syscfg get DeviceType)" - echo_t "[utopia][init] Devicetype is $CURRENT_DEVICETYPE" - if [ "$CURRENT_DEVICETYPE" != "PROD" ]; then - echo_t "[utopia][init] setting DeviceType to PROD" - syscfg set DeviceType "PROD" - else - echo_t "[utopia][init] DeviceType is already PROD, no change needed" - fi - syscfg set devicetype_migrate "1" - syscfg commit + CURRENT_DEVICETYPE="$(syscfg get DeviceType)" + echo_t "[utopia][init] Devicetype is $CURRENT_DEVICETYPE" + if [ "$CURRENT_DEVICETYPE" != "PROD" ]; then + echo_t "[utopia][init] setting DeviceType to PROD" + syscfg set DeviceType "PROD" + else + echo_t "[utopia][init] DeviceType is already PROD, no change needed" + fi + syscfg set devicetype_migrate "1" + syscfg commit fi if [ -f $SYSCFG_OLDBKUP_FILE ];then From f3f8e0c3b65ac5c6c0f9b7b0afe3555236e546a2 Mon Sep 17 00:00:00 2001 From: NareshM1702 Date: Mon, 23 Feb 2026 12:30:43 +0530 Subject: [PATCH 14/20] fixing echo_t and logging --- .../scripts/init/system/utopia_init_hub4.sh | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/source/scripts/init/system/utopia_init_hub4.sh b/source/scripts/init/system/utopia_init_hub4.sh index 55b59e5d..775ab480 100755 --- a/source/scripts/init/system/utopia_init_hub4.sh +++ b/source/scripts/init/system/utopia_init_hub4.sh @@ -204,19 +204,19 @@ if [ "$SYSCFG_LAN_DOMAIN" == "utopia.net" ]; then syscfg commit fi -# Change device type on firmware upgrade +#Change devicetype on firmware upgrade DEVICETYPE_MIGRATE="$(syscfg get devicetype_migrate)" if [ -z "$DEVICETYPE_MIGRATE" ]; then - CURRENT_DEVICETYPE="$(syscfg get DeviceType)" - echo "[utopia] Devicetype is $CURRENT_DEVICETYPE" - if [ "$CURRENT_DEVICETYPE" != "PROD" ]; then - echo "setting DeviceType to PROD" - syscfg set DeviceType "PROD" - else - echo "DeviceType is already PROD, no change needed" - fi - syscfg set devicetype_migrate "1" - syscfg commit + CURRENT_DEVICETYPE="$(syscfg get DeviceType)" + echo_t "[utopia][init] Devicetype is $CURRENT_DEVICETYPE" + if [ "$CURRENT_DEVICETYPE" != "PROD" ]; then + echo_t "[utopia][init] setting DeviceType to PROD" + syscfg set DeviceType "PROD" + else + echo_t "[utopia][init] DeviceType is already PROD, no change needed" + fi + syscfg set devicetype_migrate "1" + syscfg commit fi #Hard Factory reset from mount-fs.sh From 48c4ca2a6b090ba15f2d45a8bf632b7c9932bec7 Mon Sep 17 00:00:00 2001 From: NareshM1702 Date: Mon, 23 Feb 2026 12:32:36 +0530 Subject: [PATCH 15/20] fixing logging and spacing --- source/scripts/init/system/utopia_init_xb6.sh | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/source/scripts/init/system/utopia_init_xb6.sh b/source/scripts/init/system/utopia_init_xb6.sh index e1ec0210..4e5fede8 100755 --- a/source/scripts/init/system/utopia_init_xb6.sh +++ b/source/scripts/init/system/utopia_init_xb6.sh @@ -409,19 +409,19 @@ else echo "SSH: Forward SSH changed to disabled" >> $Log_file fi -# Change device type on firmware upgrade +#Change devicetype on firmware upgrade DEVICETYPE_MIGRATE="$(syscfg get devicetype_migrate)" if [ -z "$DEVICETYPE_MIGRATE" ]; then - CURRENT_DEVICETYPE="$(syscfg get DeviceType)" - echo "[Utopia] Devicetype is $CURRENT_DEVICETYPE" - if [ "$CURRENT_DEVICETYPE" != "PROD" ]; then - echo "setting DeviceType to PROD" - syscfg set DeviceType "PROD" - else - echo "DeviceType is already PROD, no change needed" - fi - syscfg set devicetype_migrate "1" - syscfg commit + CURRENT_DEVICETYPE="$(syscfg get DeviceType)" + echo_t "[utopia][init] Devicetype is $CURRENT_DEVICETYPE" + if [ "$CURRENT_DEVICETYPE" != "PROD" ]; then + echo_t "[utopia][init] setting DeviceType to PROD" + syscfg set DeviceType "PROD" + else + echo_t "[utopia][init] DeviceType is already PROD, no change needed" + fi + syscfg set devicetype_migrate "1" + syscfg commit fi #IGMP PROXY Disbaling on migration From 23943bd387c8c7e8f96457875eb1b560dc277ed4 Mon Sep 17 00:00:00 2001 From: nm296 Date: Thu, 26 Feb 2026 12:40:03 +0000 Subject: [PATCH 16/20] Revert "RDKB-63415 : Move SelfHeal Scripts to Cron (#229) (rebase) (#239)" This reverts commit 5a05e85589f234b702295ae649e3166f15962a79. --- .../scripts/init/defaults/system_defaults_arm | 2 -- .../scripts/init/defaults/system_defaults_bci | 2 -- .../scripts/init/service.d/service_crond.sh | 35 ++----------------- 3 files changed, 2 insertions(+), 37 deletions(-) diff --git a/source/scripts/init/defaults/system_defaults_arm b/source/scripts/init/defaults/system_defaults_arm index f6534cc8..439ecb9f 100755 --- a/source/scripts/init/defaults/system_defaults_arm +++ b/source/scripts/init/defaults/system_defaults_arm @@ -1498,8 +1498,6 @@ $FwDwld_AvlMem_RsrvThreshold=20 #FwDwld_ImageProcMemPercent Default value $FwDwld_ImageProcMemPercent=0 -#SelfHeal Cron - RFC flag is enabled by default -$SelfHealCronEnable=true #STAGE Default value $StageEnabled=false diff --git a/source/scripts/init/defaults/system_defaults_bci b/source/scripts/init/defaults/system_defaults_bci index f3bc7755..79a98357 100755 --- a/source/scripts/init/defaults/system_defaults_bci +++ b/source/scripts/init/defaults/system_defaults_bci @@ -1348,8 +1348,6 @@ $FwDwld_AvlMem_RsrvThreshold=20 #FwDwld_ImageProcMemPercent Default value $FwDwld_ImageProcMemPercent=0 -#SelfHeal Cron - RFC flag is enabled by default -$SelfHealCronEnable=true #STAGE Default value $StageEnabled=false diff --git a/source/scripts/init/service.d/service_crond.sh b/source/scripts/init/service.d/service_crond.sh index 33b9757f..26dd4340 100755 --- a/source/scripts/init/service.d/service_crond.sh +++ b/source/scripts/init/service.d/service_crond.sh @@ -167,44 +167,13 @@ service_start () # Don't Zero iptable Counter echo "58 * * * * /usr/bin/GenFWLog -nz" >> $CRONTAB_FILE - SELFHEAL_CRON_ENABLE=$(syscfg get SelfHealCronEnable) - SELFHEAL_ENABLE=$(syscfg get selfheal_enable) - if [ "$SELFHEAL_CRON_ENABLE" = "true" ] && [ "$SELFHEAL_ENABLE" = "true" ]; then - echo_t "SelfHeal Cron is enabled" - # Monitor selfheal_aggressive.sh based on syscfg value - AGGRESSIVE_INTERVAL=$(syscfg get AggressiveInterval) - if [ -z "$AGGRESSIVE_INTERVAL" ]; then - AGGRESSIVE_INTERVAL=5 - fi - #Write cron rule - echo "*/$AGGRESSIVE_INTERVAL * * * * /usr/ccsp/tad/selfheal_aggressive.sh" >> $CRONTAB_FILE - - # Monitor resource_monitor.sh based on syscfg value - RESOURCE_MONITOR_INTERVAL=$(syscfg get resource_monitor_interval) - if [ -z "$RESOURCE_MONITOR_INTERVAL" ]; then - RESOURCE_MONITOR_INTERVAL=15 - fi - echo "*/$RESOURCE_MONITOR_INTERVAL * * * * /usr/ccsp/tad/resource_monitor.sh" >> $CRONTAB_FILE - - # Monitor self_heal_connectivity_test.sh based on syscfg value - SELFHEAL_PING_INTERVAL=$(syscfg get ConnTest_PingInterval) - if [ -z "$SELFHEAL_PING_INTERVAL" ]; then - SELFHEAL_PING_INTERVAL=60 - fi - echo "*/$SELFHEAL_PING_INTERVAL * * * * /usr/ccsp/tad/self_heal_connectivity_test.sh" >> $CRONTAB_FILE - echo_t "Selfheal cron jobs are started" - - else - echo_t "Selfheal cron is disabled" - # Monitor syscfg DB every 15minutes - echo "*/15 * * * * /usr/ccsp/tad/syscfg_recover.sh" >> $CRONTAB_FILE + # Monitor syscfg DB every 15minutes + echo "*/15 * * * * /usr/ccsp/tad/syscfg_recover.sh" >> $CRONTAB_FILE # Monitor resource_monitor.sh every 5 minutes TCCBR-3288 # if [ "$BOX_TYPE" = "TCCBR" ]; then echo "*/5 * * * * /usr/ccsp/tad/resource_monitor_recover.sh" >> $CRONTAB_FILE # fi - - fi # RDKB-23651 if [ "$THERMALCTRL_ENABLE" = "true" ]; then From a5d667a9cda2da1a0d1d0d193538e59d89acaec2 Mon Sep 17 00:00:00 2001 From: nm296 Date: Thu, 26 Feb 2026 13:13:40 +0000 Subject: [PATCH 17/20] Remove unintended changes in defaults and crond files --- .../scripts/init/defaults/system_defaults_arm | 2 ++ .../scripts/init/defaults/system_defaults_bci | 2 ++ .../scripts/init/service.d/service_crond.sh | 35 +++++++++++++++++-- 3 files changed, 37 insertions(+), 2 deletions(-) diff --git a/source/scripts/init/defaults/system_defaults_arm b/source/scripts/init/defaults/system_defaults_arm index 439ecb9f..f6534cc8 100755 --- a/source/scripts/init/defaults/system_defaults_arm +++ b/source/scripts/init/defaults/system_defaults_arm @@ -1498,6 +1498,8 @@ $FwDwld_AvlMem_RsrvThreshold=20 #FwDwld_ImageProcMemPercent Default value $FwDwld_ImageProcMemPercent=0 +#SelfHeal Cron - RFC flag is enabled by default +$SelfHealCronEnable=true #STAGE Default value $StageEnabled=false diff --git a/source/scripts/init/defaults/system_defaults_bci b/source/scripts/init/defaults/system_defaults_bci index 79a98357..f3bc7755 100755 --- a/source/scripts/init/defaults/system_defaults_bci +++ b/source/scripts/init/defaults/system_defaults_bci @@ -1348,6 +1348,8 @@ $FwDwld_AvlMem_RsrvThreshold=20 #FwDwld_ImageProcMemPercent Default value $FwDwld_ImageProcMemPercent=0 +#SelfHeal Cron - RFC flag is enabled by default +$SelfHealCronEnable=true #STAGE Default value $StageEnabled=false diff --git a/source/scripts/init/service.d/service_crond.sh b/source/scripts/init/service.d/service_crond.sh index 26dd4340..33b9757f 100755 --- a/source/scripts/init/service.d/service_crond.sh +++ b/source/scripts/init/service.d/service_crond.sh @@ -167,13 +167,44 @@ service_start () # Don't Zero iptable Counter echo "58 * * * * /usr/bin/GenFWLog -nz" >> $CRONTAB_FILE - # Monitor syscfg DB every 15minutes - echo "*/15 * * * * /usr/ccsp/tad/syscfg_recover.sh" >> $CRONTAB_FILE + SELFHEAL_CRON_ENABLE=$(syscfg get SelfHealCronEnable) + SELFHEAL_ENABLE=$(syscfg get selfheal_enable) + if [ "$SELFHEAL_CRON_ENABLE" = "true" ] && [ "$SELFHEAL_ENABLE" = "true" ]; then + echo_t "SelfHeal Cron is enabled" + # Monitor selfheal_aggressive.sh based on syscfg value + AGGRESSIVE_INTERVAL=$(syscfg get AggressiveInterval) + if [ -z "$AGGRESSIVE_INTERVAL" ]; then + AGGRESSIVE_INTERVAL=5 + fi + #Write cron rule + echo "*/$AGGRESSIVE_INTERVAL * * * * /usr/ccsp/tad/selfheal_aggressive.sh" >> $CRONTAB_FILE + + # Monitor resource_monitor.sh based on syscfg value + RESOURCE_MONITOR_INTERVAL=$(syscfg get resource_monitor_interval) + if [ -z "$RESOURCE_MONITOR_INTERVAL" ]; then + RESOURCE_MONITOR_INTERVAL=15 + fi + echo "*/$RESOURCE_MONITOR_INTERVAL * * * * /usr/ccsp/tad/resource_monitor.sh" >> $CRONTAB_FILE + + # Monitor self_heal_connectivity_test.sh based on syscfg value + SELFHEAL_PING_INTERVAL=$(syscfg get ConnTest_PingInterval) + if [ -z "$SELFHEAL_PING_INTERVAL" ]; then + SELFHEAL_PING_INTERVAL=60 + fi + echo "*/$SELFHEAL_PING_INTERVAL * * * * /usr/ccsp/tad/self_heal_connectivity_test.sh" >> $CRONTAB_FILE + echo_t "Selfheal cron jobs are started" + + else + echo_t "Selfheal cron is disabled" + # Monitor syscfg DB every 15minutes + echo "*/15 * * * * /usr/ccsp/tad/syscfg_recover.sh" >> $CRONTAB_FILE # Monitor resource_monitor.sh every 5 minutes TCCBR-3288 # if [ "$BOX_TYPE" = "TCCBR" ]; then echo "*/5 * * * * /usr/ccsp/tad/resource_monitor_recover.sh" >> $CRONTAB_FILE # fi + + fi # RDKB-23651 if [ "$THERMALCTRL_ENABLE" = "true" ]; then From 6aeb78d2c7e8ad0c0289b92c6dde0a740f50a828 Mon Sep 17 00:00:00 2001 From: NareshM1702 Date: Mon, 2 Mar 2026 12:39:20 +0530 Subject: [PATCH 18/20] Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- source/scripts/init/system/utopia_init.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/scripts/init/system/utopia_init.sh b/source/scripts/init/system/utopia_init.sh index db1b4c16..d3b6cc84 100755 --- a/source/scripts/init/system/utopia_init.sh +++ b/source/scripts/init/system/utopia_init.sh @@ -267,7 +267,12 @@ DEVICETYPE_MIGRATE="$(syscfg get devicetype_migrate)" if [ -z "$DEVICETYPE_MIGRATE" ]; then CURRENT_DEVICETYPE="$(syscfg get DeviceType)" echo_t "[utopia][init] Devicetype is $CURRENT_DEVICETYPE" - if [ "$CURRENT_DEVICETYPE" != "PROD" ]; then + # When DeviceType has never been set in syscfg, CURRENT_DEVICETYPE will be empty. + # Explicitly migrate empty/unset or non-PROD DeviceType values to PROD. + if [ -z "$CURRENT_DEVICETYPE" ]; then + echo_t "[utopia][init] DeviceType is unset or empty, migrating to PROD" + syscfg set DeviceType "PROD" + elif [ "$CURRENT_DEVICETYPE" != "PROD" ]; then echo_t "[utopia][init] setting DeviceType to PROD" syscfg set DeviceType "PROD" else From 710a700126103409cd1ca379f162d1ac9a16d5b0 Mon Sep 17 00:00:00 2001 From: NareshM1702 Date: Mon, 2 Mar 2026 12:40:49 +0530 Subject: [PATCH 19/20] Update utopia_init_hub4.sh --- source/scripts/init/system/utopia_init_hub4.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/source/scripts/init/system/utopia_init_hub4.sh b/source/scripts/init/system/utopia_init_hub4.sh index 775ab480..951af096 100755 --- a/source/scripts/init/system/utopia_init_hub4.sh +++ b/source/scripts/init/system/utopia_init_hub4.sh @@ -208,8 +208,13 @@ fi DEVICETYPE_MIGRATE="$(syscfg get devicetype_migrate)" if [ -z "$DEVICETYPE_MIGRATE" ]; then CURRENT_DEVICETYPE="$(syscfg get DeviceType)" - echo_t "[utopia][init] Devicetype is $CURRENT_DEVICETYPE" - if [ "$CURRENT_DEVICETYPE" != "PROD" ]; then + echo_t "[utopia][init] Devicetype is $CURRENT_DEVICETYPE"Expand commentComment on line R269Resolved + # When DeviceType has never been set in syscfg, CURRENT_DEVICETYPE will be empty. + # Explicitly migrate empty/unset or non-PROD DeviceType values to PROD. + if [ -z "$CURRENT_DEVICETYPE" ]; then + echo_t "[utopia][init] DeviceType is unset or empty, migrating to PROD" + syscfg set DeviceType "PROD" + elif [ "$CURRENT_DEVICETYPE" != "PROD" ]; then echo_t "[utopia][init] setting DeviceType to PROD" syscfg set DeviceType "PROD" else From dd66c79929c3346089fd036c4f51de6fe1d57fcd Mon Sep 17 00:00:00 2001 From: NareshM1702 Date: Mon, 2 Mar 2026 12:41:26 +0530 Subject: [PATCH 20/20] Update utopia_init_xb6.sh --- source/scripts/init/system/utopia_init_xb6.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/source/scripts/init/system/utopia_init_xb6.sh b/source/scripts/init/system/utopia_init_xb6.sh index 4e5fede8..412ef231 100755 --- a/source/scripts/init/system/utopia_init_xb6.sh +++ b/source/scripts/init/system/utopia_init_xb6.sh @@ -413,8 +413,13 @@ fi DEVICETYPE_MIGRATE="$(syscfg get devicetype_migrate)" if [ -z "$DEVICETYPE_MIGRATE" ]; then CURRENT_DEVICETYPE="$(syscfg get DeviceType)" - echo_t "[utopia][init] Devicetype is $CURRENT_DEVICETYPE" - if [ "$CURRENT_DEVICETYPE" != "PROD" ]; then + echo_t "[utopia][init] Devicetype is $CURRENT_DEVICETYPE"Expand commentComment on line R269Resolved + # When DeviceType has never been set in syscfg, CURRENT_DEVICETYPE will be empty. + # Explicitly migrate empty/unset or non-PROD DeviceType values to PROD. + if [ -z "$CURRENT_DEVICETYPE" ]; then + echo_t "[utopia][init] DeviceType is unset or empty, migrating to PROD" + syscfg set DeviceType "PROD" + elif [ "$CURRENT_DEVICETYPE" != "PROD" ]; then echo_t "[utopia][init] setting DeviceType to PROD" syscfg set DeviceType "PROD" else