Skip to content

Conversation

@KTirumalaSrihari
Copy link

No description provided.

rdkcmf-jenkins and others added 30 commits June 24, 2025 15:09
Sysint Release for Develop
RDKTV-38567: PAT_EntOS_A4K-Soft Reboot failed from settings; Stuck on Black screen
Reason for change: Defauting MTLS and remove fallback
Test Procedure: Make sure all communication is MTLS & secure
Risks: Medium
Priority: P1
Deploy fossid_integration_stateless_diffscan_target_repo action
Release tag for sysint repo
naveenkumarhanasi and others added 16 commits December 17, 2025 20:21
Sysint 4.2.1 release with network updates
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
RDK-59247: cleaning up network scripts.
…ts To C Implementation (#410)

* Update Start_MaintenanceTasks.sh

* Update lib/rdk/Start_MaintenanceTasks.sh

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update lib/rdk/Start_MaintenanceTasks.sh

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update Start_MaintenanceTasks.sh

* Update Start_MaintenanceTasks.sh

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update Start_MaintenanceTasks.sh

* Update Start_MaintenanceTasks.sh

* Update Start_MaintenanceTasks.sh

* Update Start_MaintenanceTasks.sh

* Update Start_MaintenanceTasks.sh

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Saranya2421 <saranya.suvi@gmail.com>
Sysint 4.2.2 release for logupload migration to C
Signed-off-by: Pothiraj Paulraj <pothiraj.paulraj@sky.uk>
Copilot AI review requested due to automatic review settings January 28, 2026 06:21
@KTirumalaSrihari KTirumalaSrihari requested a review from a team as a code owner January 28, 2026 06:21
@github-actions
Copy link


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


15 out of 17 committers have signed the CLA.
✅ (rdkcmf-jenkins)[https://github.com/rdkcmf-jenkins]
✅ (sbarre01)[https://github.com/sbarre01]
✅ (nhanasi)[https://github.com/nhanasi]
✅ (AravindanNC)[https://github.com/AravindanNC]
✅ (Alan-Ryan)[https://github.com/Alan-Ryan]
✅ (MonekaLakshmi)[https://github.com/MonekaLakshmi]
✅ (nivetha1766)[https://github.com/nivetha1766]
✅ (Saranya2421)[https://github.com/Saranya2421]
✅ (madhubabutt)[https://github.com/madhubabutt]
✅ (bpunnuru)[https://github.com/bpunnuru]
✅ (sindhu-krishnan)[https://github.com/sindhu-krishnan]
✅ (sergiygladkyy)[https://github.com/sergiygladkyy]
✅ (yogeswaransky)[https://github.com/yogeswaransky]
✅ (sborushevsky)[https://github.com/sborushevsky]
✅ (Abhinavpv28)[https://github.com/Abhinavpv28]
@udaykrishnag
@vrenu2018
You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR rebases the feature/RDKEMW-8178 branch inline with the develop branch, consolidating multiple features and fixes from versions 3.0.5 through 4.2.2. The changes focus on network management improvements, system monitoring enhancements, log upload modernization, and various cleanup activities.

Changes:

  • Removes obsolete scheduled reboot, timesyncd restart, and reboot counter services along with their associated scripts
  • Updates systemd service files to use network-online.target instead of network-up.target for better network dependency management
  • Refactors network management scripts by consolidating updateGlobalIPInfo.sh functionality into NM_Dispatcher.sh and NM_preDown.sh
  • Adds swap memory monitoring to system health collection
  • Implements logupload binary with script fallback mechanism
  • Updates MTLS log upload to default configuration and removes conditional xPKI checks
  • Adds NetworkManager migration support and configuration management

Reviewed changes

Copilot reviewed 40 out of 40 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
systemd_units/*.service (deleted) Removes obsolete reboot scheduler, timesyncd restart, and reboot counter services
lib/rdk/rebootSTB.sh (deleted) Removes scheduled reboot script (functionality moved elsewhere)
lib/rdk/updateGlobalIPInfo.sh (deleted) Functionality refactored into NM_Dispatcher.sh and NM_preDown.sh
lib/rdk/connectivitycheck.sh (deleted) Removes standalone connectivity check (replaced by NetworkManager-based approach)
systemd_units/*-upload.service Updates network dependency from network-up.target to network-online.target
lib/rdk/uploadSTBLogs.sh Defaults to MTLS and removes conditional xPKI logic
lib/rdk/NM_Bootstrap.sh Adds WiFi migration support and NetworkManager configuration handling
lib/rdk/NM_Dispatcher.sh Refactors global IP info handling and removes redundant connectivity checks
lib/rdk/system_info_collector.sh Adds swap memory metrics collection and logging
lib/rdk/Start_MaintenanceTasks.sh Implements logupload binary execution with fallback to script
lib/rdk/rebootNow.sh Changes reboot to background execution with improved failure handling
.github/workflows/*.yml Updates workflow configurations for CLA and FOSSID scanning
CHANGELOG.md Documents all changes from versions 3.0.5 through 4.2.2
Comments suppressed due to low confidence (1)

lib/rdk/NM_Bootstrap.sh:36

  • The script uses bash-specific regex matching syntax (=~) and BASH_REMATCH array, but the shebang is #!/bin/sh, not #!/bin/bash. This will fail on systems where /bin/sh is not bash. Either change the shebang to #!/bin/bash or rewrite the regex matching using POSIX-compliant methods such as grep or sed.
  if [[ "$PSK_LINE" =~ psk=\"(.+)\" ]]; then
    PSK="${BASH_REMATCH[1]}"

  # Case 2: Unquoted 64-char raw PSK
  elif [[ "$PSK_LINE" =~ psk=([a-fA-F0-9]{64}) ]]; then
    PSK="${BASH_REMATCH[1]}"

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +82 to +95
if [ "x$cmd" == "xdelete" ] && [ "x$flags" == "xglobal" ]; then
if ! check_valid_IPaddress "$mode" "$addr"; then
return
fi

if [[ "$ifc" == "$ESTB_INTERFACE" || "$ifc" == "$DEFAULT_ESTB_INTERFACE" || "$ifc" == "$ESTB_INTERFACE:0" ]]; then
NMdispatcherLog "Updating Box/ESTB IP"
rm -f /tmp/.$mode$ESTB_INTERFACE
refresh_devicedetails "estb_ip"
elif [[ "$ifc" == "$MOCA_INTERFACE" || "$ifc" == "$MOCA_INTERFACE:0" ]]; then
NMdispatcherLog "Updating MoCA IP"
rm -f /tmp/.$mode$MOCA_INTERFACE
refresh_devicedetails "moca_ip"
elif [[ "$ifc" == "$WIFI_INTERFACE" || "$ifc" == "$WIFI_INTERFACE:0" ]]; then
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent comparison operator usage. Lines 82, 87, 91, 95 use "==" for string comparison, which is bash-specific. Since the script uses "#!/bin/sh" shebang (line 1), it should use POSIX-compliant "=" for string comparisons. Note that lines 57, 63, and 65 already use "=" correctly.

Suggested change
if [ "x$cmd" == "xdelete" ] && [ "x$flags" == "xglobal" ]; then
if ! check_valid_IPaddress "$mode" "$addr"; then
return
fi
if [[ "$ifc" == "$ESTB_INTERFACE" || "$ifc" == "$DEFAULT_ESTB_INTERFACE" || "$ifc" == "$ESTB_INTERFACE:0" ]]; then
NMdispatcherLog "Updating Box/ESTB IP"
rm -f /tmp/.$mode$ESTB_INTERFACE
refresh_devicedetails "estb_ip"
elif [[ "$ifc" == "$MOCA_INTERFACE" || "$ifc" == "$MOCA_INTERFACE:0" ]]; then
NMdispatcherLog "Updating MoCA IP"
rm -f /tmp/.$mode$MOCA_INTERFACE
refresh_devicedetails "moca_ip"
elif [[ "$ifc" == "$WIFI_INTERFACE" || "$ifc" == "$WIFI_INTERFACE:0" ]]; then
if [ "x$cmd" = "xdelete" ] && [ "x$flags" = "xglobal" ]; then
if ! check_valid_IPaddress "$mode" "$addr"; then
return
fi
if [ "$ifc" = "$ESTB_INTERFACE" ] || [ "$ifc" = "$DEFAULT_ESTB_INTERFACE" ] || [ "$ifc" = "$ESTB_INTERFACE:0" ]; then
NMdispatcherLog "Updating Box/ESTB IP"
rm -f /tmp/.$mode$ESTB_INTERFACE
refresh_devicedetails "estb_ip"
elif [ "$ifc" = "$MOCA_INTERFACE" ] || [ "$ifc" = "$MOCA_INTERFACE:0" ]; then
NMdispatcherLog "Updating MoCA IP"
rm -f /tmp/.$mode$MOCA_INTERFACE
refresh_devicedetails "moca_ip"
elif [ "$ifc" = "$WIFI_INTERFACE" ] || [ "$ifc" = "$WIFI_INTERFACE:0" ]; then

Copilot uses AI. Check for mistakes.
sync
rebootLog "End of the sync"

rebootLog "Creating $REBOOTNOW_FLAG as the reboot was triggred by RDK software"
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in log message: "triggred" should be "triggered".

Suggested change
rebootLog "Creating $REBOOTNOW_FLAG as the reboot was triggred by RDK software"
rebootLog "Creating $REBOOTNOW_FLAG as the reboot was triggered by RDK software"

Copilot uses AI. Check for mistakes.
Comment on lines +60 to +67
if [ "x$mode" == "xipv6" ]; then
if [[ $addr == fc* || $addr == fd* ]]; then
return 1
fi
elif [ "x$mode" == "xipv4" ]; then
autoIPTrunc=$(echo $addr | cut -d "." -f1-2)
if [ "$autoIPTrunc" == "169.254" ]; then
return 1
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent comparison operator usage in shell scripts. NM_Dispatcher.sh uses "==" (bash-style) on lines 60-61, 64-67, while NM_preDown.sh uses "=" (POSIX-compliant) on lines 57, 63. For maximum portability, it's recommended to use "=" for string comparison in shell scripts, especially since the shebang is "#!/bin/sh" (not bash).

Copilot uses AI. Check for mistakes.
Comment on lines +73 to +74
cp /opt/NetworkManager/system-connections/* /opt/secure/NetworkManager/system-connections/
rm -rf /opt/NetworkManager/system-connections/*
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cp command will fail if /opt/NetworkManager/system-connections/ is empty (no files to copy). Consider adding a check or using a glob pattern like: if [ -n "$(ls -A /opt/NetworkManager/system-connections/ 2>/dev/null)" ]; then cp /opt/NetworkManager/system-connections/* /opt/secure/NetworkManager/system-connections/; fi

Suggested change
cp /opt/NetworkManager/system-connections/* /opt/secure/NetworkManager/system-connections/
rm -rf /opt/NetworkManager/system-connections/*
if [ -n "$(ls -A /opt/NetworkManager/system-connections 2>/dev/null)" ]; then
cp /opt/NetworkManager/system-connections/* /opt/secure/NetworkManager/system-connections/
rm -rf /opt/NetworkManager/system-connections/*
fi

Copilot uses AI. Check for mistakes.
Comment on lines +188 to +193
sh $LOGUPLOAD_SCRIPT "$tftp_server" 1 1 "$uploadOnReboot" "$upload_protocol" "$upload_httplink" "$TriggerType" 2>/dev/null
result=$?
fi
else
logUploadLog "logupload binary not found at $LOG_UPLOAD_BIN_PATH...executing script"
sh $LOGUPLOAD_SCRIPT "$tftp_server" 1 1 "$uploadOnReboot" "$upload_protocol" "$upload_httplink" "$TriggerType" 2>&1
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent error output redirection. Line 193 uses "2>&1" (redirect stderr to stdout), while line 188 uses "2>/dev/null" (discard stderr). For consistency and to help with debugging, consider using the same redirection pattern for both the binary fallback case and the direct script execution case.

Copilot uses AI. Check for mistakes.
fi


if [ "$BOOT_TYPE" == "BOOT_MIGRATION" ]; then
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comparison operators "==" used on lines 46 and 82 are bash-specific. Since the shebang is #!/bin/sh, use the POSIX-compliant "=" operator instead. Change to: if [ "$BOOT_TYPE" = "BOOT_MIGRATION" ]; then

Suggested change
if [ "$BOOT_TYPE" == "BOOT_MIGRATION" ]; then
if [ "$BOOT_TYPE" = "BOOT_MIGRATION" ]; then

Copilot uses AI. Check for mistakes.
fi
fi

if [ -z $SSID ]; then
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable $SSID should be quoted in the test condition to handle cases where SSID is unset or contains spaces. Without quotes, if SSID is unset, this will result in a syntax error. Change to: if [ -z "$SSID" ]; then

Copilot uses AI. Check for mistakes.
if [ -d /opt/secure/NetworkManager/system-connections ]; then
rm -rf /opt/secure/NetworkManager/system-connections/*
fi
if [ -z $PSK ]; then
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable $PSK should be quoted in the test condition to handle cases where PSK is unset or contains spaces. Without quotes, if PSK is unset, this will result in a syntax error. Change to: if [ -z "$PSK" ]; then

Suggested change
if [ -z $PSK ]; then
if [ -z "$PSK" ]; then

Copilot uses AI. Check for mistakes.
# NTP URL from the property file
get_ntp_hosts
sleep 5
echo "Attempt $attempts - Failed to retrieve NTP server URL, attempting again..."
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The echo statement outputs to stdout instead of being redirected to the log file. This should be: echo "Attempt $attempts - Failed to retrieve NTP server URL, attempting again..." >> $LOG_FILE or use ntpLog function for consistent logging.

Suggested change
echo "Attempt $attempts - Failed to retrieve NTP server URL, attempting again..."
ntpLog "Attempt $attempts - Failed to retrieve NTP server URL, attempting again..."

Copilot uses AI. Check for mistakes.
##############################################################################

WIFI_WPA_SUPPLICANT_CONF="/opt/secure/wifi/wpa_supplicant.conf"
BOOT_TYPE=$(grep "BOOT_TYPE" /tmp/bootType | cut -d '=' -f 2)
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The grep command reading BOOT_TYPE from /tmp/bootType should handle the case where the file doesn't exist. If /tmp/bootType doesn't exist, this will cause an error message. Consider adding a check: if [ -f /tmp/bootType ]; then BOOT_TYPE=$(grep "BOOT_TYPE" /tmp/bootType | cut -d '=' -f 2); fi

Suggested change
BOOT_TYPE=$(grep "BOOT_TYPE" /tmp/bootType | cut -d '=' -f 2)
if [ -f /tmp/bootType ]; then
BOOT_TYPE=$(grep "BOOT_TYPE" /tmp/bootType | cut -d '=' -f 2)
else
BOOT_TYPE=""
fi

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.