From 362e96dce930229d218ec46d86dc5327d35d6fd1 Mon Sep 17 00:00:00 2001 From: nhanasi Date: Fri, 26 Sep 2025 12:46:16 -0400 Subject: [PATCH] RDKEMW-8748 Bring RDKTV-38567 changes to develop and release release/8.3.4.0 Update rebootNow.sh to force reboot upon reboot failure --- lib/rdk/rebootNow.sh | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/lib/rdk/rebootNow.sh b/lib/rdk/rebootNow.sh index e93dceb8..d32c7649 100755 --- a/lib/rdk/rebootNow.sh +++ b/lib/rdk/rebootNow.sh @@ -472,21 +472,18 @@ rebootLog "End of the sync" rebootLog "Creating $REBOOTNOW_FLAG as the reboot was triggred by RDK software" touch $REBOOTNOW_FLAG -rebootLog "Rebooting the Device Now" rm -rf $pid_file -reboot -sleep 15 +rebootLog "Rebooting the Device Now" +reboot & +REBOOT_PID=$! -rebootLog "System still running after reboot command, Reboot Failed..." -rebootLog "Invoking Systemctl Reboot After First Reboot Attempt Failure" +sleep 90 +rebootLog "System still running after reboot command, Reboot Failed for $REBOOT_PID..." systemctl reboot if [ $? -eq 1 ]; then - rebootLog "Reboot failed due to systemctl hang or connection timeout, trying force reboot..." - if [ -f /tmp/systemd_freeze_reboot_on ]; then - rebootLog "Force Reboot due to systemd freeze detection" - else - rebootLog "Force Reboot after systemd reboot failure" - fi - reboot -f -fi + rebootLog "Reboot failed due to systemctl hang or connection timeout" +fi +kill $REBOOT_PID 2>/dev/null +rebootLog "Triggering force Reboot after standard soft reboot failure" +reboot -f