Skip to content

rebase#432

Open
nhanasi wants to merge 116 commits intofeature/RDKEVD-5412from
develop
Open

rebase#432
nhanasi wants to merge 116 commits intofeature/RDKEVD-5412from
develop

Conversation

@nhanasi
Copy link
Copy Markdown
Contributor

@nhanasi nhanasi commented Jan 27, 2026

No description provided.

Garpathi, Uday Krishna and others added 16 commits October 15, 2025 15:07
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
@nhanasi nhanasi requested a review from a team as a code owner January 27, 2026 22:12
Copilot AI review requested due to automatic review settings January 27, 2026 22:12
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jan 27, 2026


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


12 out of 13 committers have signed the CLA.
AravindanNC
sborushevsky
Abhinavpv28
nhanasi
gururaajar
shibu-kv
sindhu-krishnan
NareshM1702
Saranya2421
KTirumalaSrihari
dharshini555
aminaseyyad
udaykrishnag
You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

Copy link
Copy Markdown
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 consolidates multiple changes from a rebase operation, including network script refactoring, log upload binary migration, and configuration updates.

Changes:

  • Deleted updateGlobalIPInfo.sh and refactored its functionality into NM_Dispatcher.sh and NM_preDown.sh
  • Added support for a binary log upload implementation with fallback to script-based approach in Start_MaintenanceTasks.sh
  • Added com.comcast.viper_ipa to warehouse testing exceptions in wh_api_5.conf

Reviewed changes

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

Show a summary per file
File Description
lib/rdk/wh_api_5.conf Added viper_ipa app to warehouse testing exception list
lib/rdk/updateGlobalIPInfo.sh Deleted file - functionality moved to NM dispatcher scripts
lib/rdk/Start_MaintenanceTasks.sh Integrated binary-based log upload with fallback to shell script
lib/rdk/NM_preDown.sh Refactored IP deletion logic from updateGlobalIPInfo.sh
lib/rdk/NM_Dispatcher.sh Refactored IP addition logic from updateGlobalIPInfo.sh
CHANGELOG.md Updated changelog for version 4.2.2 with merged PRs

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

Comment thread lib/rdk/NM_Dispatcher.sh
Comment on lines +60 to +68
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
fi
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

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

The check_valid_IPaddress function has inconsistent implementations between NM_preDown.sh and NM_Dispatcher.sh. In NM_preDown.sh, it uses POSIX-compliant single equals (=) and a case statement for IPv6 pattern matching. In NM_Dispatcher.sh, it uses bash-specific double equals (==) and double bracket conditionals. These functions should be identical to maintain consistency and predictable behavior across both scripts.

Suggested change
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
fi
if [ "x$mode" = "xipv6" ]; then
case "$addr" in
fc*|fd*)
return 1
;;
esac
elif [ "x$mode" = "xipv4" ]; then
autoIPTrunc=$(echo "$addr" | cut -d "." -f1-2)
if [ "$autoIPTrunc" = "169.254" ]; then
return 1
fi

Copilot uses AI. Check for mistakes.
Comment thread lib/rdk/Start_MaintenanceTasks.sh Outdated
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 27, 2026

Choose a reason for hiding this comment

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

Inconsistent parameter passed to binary vs script. The binary is called with "ondemand" as the 7th argument (line 181), but when falling back to the script (line 188), it's called with "$TriggerType" which is the numeric value 5. This parameter mismatch could cause different behavior between the binary and script paths.

Suggested change
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
sh $LOGUPLOAD_SCRIPT "$tftp_server" 1 1 "$uploadOnReboot" "$upload_protocol" "$upload_httplink" "ondemand" 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" "ondemand" 2>&1

Copilot uses AI. Check for mistakes.
Comment thread lib/rdk/Start_MaintenanceTasks.sh Outdated
return 0
else
logUploadLog "Binary execution failed with result=$result; falling back to script"
nice -n 19 sh $LOGUPLOAD_SCRIPT "$tftp_server" 1 1 "$uploadOnReboot" "$upload_protocol" "$upload_httplink" &
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

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

Trailing whitespace after the ampersand on this line. This is inconsistent with line 216 which has the same command structure without trailing whitespace.

Suggested change
nice -n 19 sh $LOGUPLOAD_SCRIPT "$tftp_server" 1 1 "$uploadOnReboot" "$upload_protocol" "$upload_httplink" &
nice -n 19 sh $LOGUPLOAD_SCRIPT "$tftp_server" 1 1 "$uploadOnReboot" "$upload_protocol" "$upload_httplink" &

Copilot uses AI. Check for mistakes.
Comment thread lib/rdk/Start_MaintenanceTasks.sh Outdated
Comment on lines +200 to +216
nice -n 19 "$LOG_UPLOAD_BIN_PATH" "$tftp_server" 1 1 "$uploadOnReboot" "$upload_protocol" "$upload_httplink" >> /opt/logs/dcmscript.log &
bg_pid=$!
wait $bg_pid
result=$?
if [ "$result" -eq 0 ]; then
logUploadLog "Binary execution succeeded"
return 0
else
logUploadLog "Binary execution failed with result=$result; falling back to script"
nice -n 19 sh $LOGUPLOAD_SCRIPT "$tftp_server" 1 1 "$uploadOnReboot" "$upload_protocol" "$upload_httplink" &
bg_pid=$!
wait $bg_pid
result=$?
fi
else
logUploadLog "logupload binary not found at $LOG_UPLOAD_BIN_PATH...executing script"
nice -n 19 sh $LOGUPLOAD_SCRIPT "$tftp_server" 1 1 "$uploadOnReboot" "$upload_protocol" "$upload_httplink" &
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

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

The binary call on line 200 is missing the trigger type parameter (7th argument) that the script receives on line 216. When the binary succeeds, no trigger type is passed, but when it fails and falls back to the script, no trigger type is passed either. However, in the on-demand path (line 181), the binary receives "ondemand" as the 7th argument. This inconsistency between regular and on-demand execution paths could lead to different behavior.

Copilot uses AI. Check for mistakes.
Comment thread lib/rdk/NM_Dispatcher.sh
Comment on lines +90 to +98
echo "$addr" > /tmp/.$mode$ESTB_INTERFACE
refresh_devicedetails "estb_ip"
elif [[ "$ifc" == "$MOCA_INTERFACE" || "$ifc" == "$MOCA_INTERFACE:0" ]]; then
NMdispatcherLog "Updating MoCA IP"
echo "$addr" > /tmp/.$mode$MOCA_INTERFACE
refresh_devicedetails "moca_ip"
elif [[ "$ifc" == "$WIFI_INTERFACE" || "$ifc" == "$WIFI_INTERFACE:0" ]]; then
NMdispatcherLog "Updating Wi-Fi IP"
echo "$addr" > /tmp/.$mode$WIFI_INTERFACE
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

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

The echo "$addr" > /tmp/.$mode$ESTB_INTERFACE (and similar for MOCA_INTERFACE and WIFI_INTERFACE) writes to a predictable path in /tmp as root without any protection against symlink attacks. A local attacker who can create a symlink at /tmp/.$mode$ESTB_INTERFACE (or the other variants) can cause this script to truncate or overwrite an arbitrary file (e.g., /etc/shadow), leading to privilege escalation or data corruption. Use a safer pattern for temporary files (e.g., a dedicated directory with restricted permissions or APIs that open files with O_NOFOLLOW/proper checks) so that writes cannot be redirected via attacker-controlled symlinks.

Copilot uses AI. Check for mistakes.
Copilot AI review requested due to automatic review settings April 17, 2026 10:31
Copy link
Copy Markdown
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

Copilot reviewed 31 out of 31 changed files in this pull request and generated 3 comments.

Comments suppressed due to low confidence (1)

lib/rdk/rebootNow.sh:1

  • This PR deletes lib/rdk/rebootNow.sh, but other scripts in this repo still invoke /rebootNow.sh (e.g., lib/rdk/utils.sh, lib/rdk/factory-reset.sh, lib/rdk/userInitiatedFWDnld.sh, lib/rdk/warehouse-reset.sh). If /rebootNow.sh was provided by installing this script, those callers will break at runtime unless a compatible replacement (e.g., a C binary or shim script at /rebootNow.sh) is guaranteed to be present. Please either keep a compatibility wrapper, or update all in-repo callers to the new implementation path.

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

Comment thread lib/rdk/startStunnel.sh
Comment on lines +156 to +175
export FD_NUMBER

# Create a named pipe
PIPE=$(mktemp -u)
if ! mkfifo "$PIPE" 2>/dev/null; then
echo_t "STUNNEL: ERROR - Failed to create named pipe"
fi

# Open the pipe using the available FD, with error handling
if ! eval "exec $FD_NUMBER<>$PIPE" 2>/dev/null; then
echo_t "STUNNEL: ERROR - Failed to open pipe with file descriptor"
fi

# Removing the pipe after opening
rm "$PIPE"

# Writing passcode to open file descriptor
echo "$(eval "$PASSCODE")" >&$FD_NUMBER &
else
echo "Error: No available file descriptor to use." >&2
Comment thread lib/rdk/startStunnel.sh
Comment on lines +158 to +173
# Create a named pipe
PIPE=$(mktemp -u)
if ! mkfifo "$PIPE" 2>/dev/null; then
echo_t "STUNNEL: ERROR - Failed to create named pipe"
fi

# Open the pipe using the available FD, with error handling
if ! eval "exec $FD_NUMBER<>$PIPE" 2>/dev/null; then
echo_t "STUNNEL: ERROR - Failed to open pipe with file descriptor"
fi

# Removing the pipe after opening
rm "$PIPE"

# Writing passcode to open file descriptor
echo "$(eval "$PASSCODE")" >&$FD_NUMBER &
Comment thread lib/rdk/NM_Bootstrap.sh
Comment on lines +85 to +89
for f in /opt/secure/NetworkManager/system-connections/*; do
if grep -q "type=wifi" "$f"; then
rm -f "$f"
fi
done
naveenkumarhanasi and others added 4 commits April 23, 2026 15:53
Sysint Release 5.0.1
…is missing (#511)

* RDKEMW-10725:gstreamer-cleanup conditions when cdl_flashed_file_name is missing

Reason for change: gstreamer-cleanup is happening on every reboot when /opt/cdl_flashed_file_name is missing
Test Procedure: Boot the TV and check for gstreamer-cleanup metrics in rdk_milestones.log
Risks: low

Signed-off-by: Renuka Varry <rvarry049@cable.comcast.com>

* Apply suggestion from @Copilot

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

* RDKEMW-10725:gstreamer-cleanup conditions when cdl_flashed_file_name is missing

Reason for change: gstreamer-cleanup is happening on every reboot when /opt/cdl_flashed_file_name is missing
Test Procedure: Boot the TV and check for gstreamer-cleanup metrics in rdk_milestones.log
Risks: low

Signed-off-by: Renuka Varry <rvarry049@cable.comcast.com>

* License banner addition

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

* RDKEMW-10725:gstreamer-cleanup conditions when cdl_flashed_file_name is missing

Reason for change: gstreamer-cleanup is happening on every reboot when /opt/cdl_flashed_file_name is missing
Test Procedure: Boot the TV and check for gstreamer-cleanup metrics in rdk_milestones.log
Risks: low

Signed-off-by: Renuka Varry <rvarry049@cable.comcast.com>

---------

Signed-off-by: Renuka Varry <rvarry049@cable.comcast.com>
Co-authored-by: Renuka Varry <rvarry049@cable.comcast.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 27, 2026 19:40
Copy link
Copy Markdown
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

Copilot reviewed 32 out of 32 changed files in this pull request and generated 4 comments.

Comments suppressed due to low confidence (1)

lib/rdk/readBTAddress-generic.sh:31

  • When BLUETOOTH_ENABLED is not true, bluetooth_mac is never initialized but the script still echoes it, resulting in an empty string. Since callers (e.g., getDeviceDetails.sh) may expect a default MAC like 00:00:00:00:00:00, consider explicitly setting a default when Bluetooth is disabled or when getDeviceBluetoothMac returns empty.

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

Comment thread lib/rdk/NM_Bootstrap.sh
Comment on lines +85 to +89
for f in /opt/secure/NetworkManager/system-connections/*; do
if grep -q "type=wifi" "$f"; then
rm -f "$f"
fi
done
Comment thread lib/rdk/startStunnel.sh
Comment on lines +158 to +173
# Create a named pipe
PIPE=$(mktemp -u)
if ! mkfifo "$PIPE" 2>/dev/null; then
echo_t "STUNNEL: ERROR - Failed to create named pipe"
fi

# Open the pipe using the available FD, with error handling
if ! eval "exec $FD_NUMBER<>$PIPE" 2>/dev/null; then
echo_t "STUNNEL: ERROR - Failed to open pipe with file descriptor"
fi

# Removing the pipe after opening
rm "$PIPE"

# Writing passcode to open file descriptor
echo "$(eval "$PASSCODE")" >&$FD_NUMBER &
Comment thread CHANGELOG.md
Comment on lines +16 to +19
> 9 April 2026

- RDKEMW-15490 : Removing reboot script reference from sysint [`#500`](https://github.com/rdkcentral/sysint/pull/500)
- 5.0.0 release changelog updates [`711601e`](https://github.com/rdkcentral/sysint/commit/711601e303a449f3ea34d5f858f4d7c5d873c9c1)
Comment thread lib/rdk/startStunnel.sh
Comment on lines +112 to 127
echo "cert = $CERT_PATH" >> $STUNNEL_CONF_FILE
echo "CAfile = $CA_FILE" >> $STUNNEL_CONF_FILE
echo "verifyChain = yes" >> $STUNNEL_CONF_FILE
SERVERTYPE=`tr181 -g Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Identity.DeviceType 2>&1`
if [ ! -z "$SERVERTYPE" ]; then
if [ "$SERVERTYPE" == "TEST" ]; then
echo "checkHost = $JUMP_FQDN" >> $STUNNEL_CONF_FILE

DEVICETYPE=`tr181 -g Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Identity.DeviceType 2>&1`
echo_t "STUNNEL: Device type is $DEVICETYPE"
if [ ! -z "$DEVICETYPE" ]; then
if [ "$DEVICETYPE" == "TEST" ] || [ "$DEVICETYPE" == "test" ]; then
echo_t "STUNNEL: Device type is TEST"
t2CountNotify "SHORTS_DEVICE_TYPE_TEST"
echo "checkHost = $JUMP_FQDN" >> $STUNNEL_CONF_FILE
echo "checkHost = $DEV_SAN" >> $STUNNEL_CONF_FILE
else
echo_t "STUNNEL: Device type is PROD"
t2CountNotify "SHORTS_DEVICE_TYPE_PROD"
echo "checkHost = $JUMP_FQDN" >> $STUNNEL_CONF_FILE
echo "checkHost = $PROD_SAN" >> $STUNNEL_CONF_FILE
madhubabutt and others added 2 commits April 28, 2026 10:22
… sysint (#522)

Co-authored-by: mtirum011 <madhubabu_tirumala@comcast.com>
Copilot AI review requested due to automatic review settings May 1, 2026 15:22
Copy link
Copy Markdown
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

Copilot reviewed 32 out of 32 changed files in this pull request and generated 6 comments.

Comments suppressed due to low confidence (1)

lib/rdk/readBTAddress-generic.sh:31

  • If BLUETOOTH_ENABLED is not true, bluetooth_mac is never initialized, so this script will echo an empty value. Since callers (e.g., getDeviceDetails.sh) may expect a stable default like 00:00:00:00:00:00, either set an explicit default here or make callers treat empty output as 'Bluetooth not supported'.

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

Comment thread lib/rdk/NM_Bootstrap.sh
echo "`/bin/timestamp` :$0: Listing the connection profiles in device: " >> /opt/logs/NMMonitor.log
ls -lh /opt/secure/NetworkManager/system-connections >> /opt/logs/NMMonitor.log
echo "`/bin/timestamp` :$0: Deleting existing wifi profiles if any..." >> /opt/logs/NMMonitor.log
for f in /opt/secure/NetworkManager/system-connections/*; do
Comment thread lib/rdk/startLinkLocal.sh
Comment on lines +34 to +45
INTERFACE="$1"

# Validate input and restrict to eth0 or wlan0
if [ -z "$INTERFACE" ]; then
Log "ERROR: No interface specified"
exit 1
fi

if [ "$INTERFACE" != "$ETHERNET_INTERFACE" ] && [ "$INTERFACE" != "$WIFI_INTERFACE" ]; then
Log "INFO: Link-local not started for $INTERFACE (only eth0 and wlan0 allowed)"
exit 0
fi
Comment on lines +217 to 221
if [ -f "/tmp/checkpacketloss" ] ; then
if [ "$version" = "V4" ] ; then
gwIp=$(cat /tmp/checkpacketloss)
pingCmd="ping"
fi
Comment on lines +299 to +308
if [ "$version" = "V6" ] && { [ "$packetsLostipv4" -lt "$WifiReassociateTolerance" ] || [ "$packetsLostipv6" -lt "$WifiReassociateTolerance" ]; }; then
echo "$(/bin/timestamp) [DEBUG_NCR] checkPacketLoss: BELOW TOLERANCE returning 0 - resetting FirstPacketLossTime/PacketLossLogTimeStamp/IsWifiReassociated. wifiDriverErrors=$wifiDriverErrors" >> "$logsFile"
FirstPacketLossTime=0
PacketLossLogTimeStamp=0
EthernetLogTimeStamp=0
IsWifiReassociated=0
[ "$wifiDriverErrors" -eq 0 ] && IsWifiReset=0 #Make IsWifiReset=0 only when there is no wifidriverissue
else
echo "$(/bin/timestamp) [DEBUG_NCR] checkPacketLoss: BELOW TOLERANCE returning 0 - skipping reset (version=$version, waiting for V6 measurement). wifiDriverErrors=$wifiDriverErrors" >> "$logsFile"
fi
Comment thread lib/rdk/startStunnel.sh
Comment on lines +153 to +173
# Get the next available file descriptor and export if it's valid
FD_NUMBER=$(get_next_fd)
if [ $? -eq 0 ]; then
export FD_NUMBER

# Create a named pipe
PIPE=$(mktemp -u)
if ! mkfifo "$PIPE" 2>/dev/null; then
echo_t "STUNNEL: ERROR - Failed to create named pipe"
fi

# Open the pipe using the available FD, with error handling
if ! eval "exec $FD_NUMBER<>$PIPE" 2>/dev/null; then
echo_t "STUNNEL: ERROR - Failed to open pipe with file descriptor"
fi

# Removing the pipe after opening
rm "$PIPE"

# Writing passcode to open file descriptor
echo "$(eval "$PASSCODE")" >&$FD_NUMBER &
echo "$(/bin/timestamp) $version gateway = $gwIp " >> "$logsFile"
if [ "$ret" = "100" ] ; then
echo "$(/bin/timestamp) TELEMETRY_GATEWAY_RESPONSE_TIME:NR,$gwIp" >> "$logsFile"
echo "$(/bin/timestamp) Current Packet loss is SYST_WARN_GW100PERC_PACKETLOSS"
vrenu2018 and others added 2 commits May 4, 2026 16:04
… present (#528)

* RDKEMW-17800:gst-cleanup conditions when cdl_flashed_file_name is not present

Reason for change: gstreamer-cleanup is happening on every reboot when /opt/cdl_flashed_file_name is missing.
Test Procedure: Boot the TV and check for gstreamer-cleanup metrics in rdk_milestones.log
Risks: low

Signed-off-by: Renuka Varry <rvarry049@cable.comcast.com>

* RDKEMW-17800:gst-cleanup conditions when cdl_flashed_file_name is not present

Reason for change: gstreamer-cleanup is happening on every reboot when /opt/cdl_flashed_file_name is missing.
Test Procedure: Boot the TV and check for gstreamer-cleanup metrics in rdk_milestones.log
Risks: low

Signed-off-by: Renuka Varry <rvarry049@cable.comcast.com>

---------

Signed-off-by: Renuka Varry <rvarry049@cable.comcast.com>
Co-authored-by: Renuka Varry <rvarry049@cable.comcast.com>
* RDKEMW-16774: [Security] Device partition structure seen in logs

* Updating system_info_collector script to log top output

---------

Co-authored-by: Saranya <saranya_elango@comcast.com>
Copilot AI review requested due to automatic review settings May 7, 2026 14:51
… crashes (#539)

Co-authored-by: mtirum011 <madhubabu_tirumala@comcast.com>
Co-authored-by: nhanasi <navihansi@gmail.com>
Copy link
Copy Markdown
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

Copilot reviewed 33 out of 33 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (1)

lib/rdk/readBTAddress-generic.sh:31

  • bluetooth_mac is only set when BLUETOOTH_ENABLED is true; otherwise this script echoes an empty string. Since getDeviceDetails.sh uses this output directly, Bluetooth-disabled devices will report an empty Bluetooth MAC (overwriting its default). Initialize bluetooth_mac to a safe default (e.g., 00:00:00:00:00:00) and only override it when getDeviceBluetoothMac returns a non-empty value.

Comment thread lib/rdk/NM_Bootstrap.sh
Comment on lines +82 to +89
echo "`/bin/timestamp` :$0: Listing the connection profiles in device: " >> /opt/logs/NMMonitor.log
ls -lh /opt/secure/NetworkManager/system-connections >> /opt/logs/NMMonitor.log
echo "`/bin/timestamp` :$0: Deleting existing wifi profiles if any..." >> /opt/logs/NMMonitor.log
for f in /opt/secure/NetworkManager/system-connections/*; do
if grep -q "type=wifi" "$f"; then
rm -f "$f"
fi
done
Comment thread lib/rdk/startStunnel.sh
Comment on lines +158 to +173
# Create a named pipe
PIPE=$(mktemp -u)
if ! mkfifo "$PIPE" 2>/dev/null; then
echo_t "STUNNEL: ERROR - Failed to create named pipe"
fi

# Open the pipe using the available FD, with error handling
if ! eval "exec $FD_NUMBER<>$PIPE" 2>/dev/null; then
echo_t "STUNNEL: ERROR - Failed to open pipe with file descriptor"
fi

# Removing the pipe after opening
rm "$PIPE"

# Writing passcode to open file descriptor
echo "$(eval "$PASSCODE")" >&$FD_NUMBER &
jincysam87 and others added 2 commits May 7, 2026 11:57
* Update NM_Bootstrap.sh

* Update NM_Bootstrap.sh

* Update NM_Bootstrap.sh

* Potential fix for pull request finding

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

* Update NM_Bootstrap.sh

* Update NM_Bootstrap.sh

* Update NM_Bootstrap.sh

* Update NM_Bootstrap.sh

* Update NM_Bootstrap.sh

* Update NM_Bootstrap.sh

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
… present (#538)

Reason for change: gstreamer-cleanup is happening on every reboot when /opt/cdl_flashed_file_name is missing. Fixing the issues as well as re-locating gstreamer-cleanup.service file to meta-rdk-video instead of sysint folder
Test Procedure: Boot the TV and check for gstreamer-cleanup metrics in rdk_milestones.log
Risks: low

Signed-off-by: Renuka Varry <rvarry049@cable.comcast.com>
Co-authored-by: Renuka Varry <rvarry049@cable.comcast.com>
Co-authored-by: nhanasi <navihansi@gmail.com>
Copilot AI review requested due to automatic review settings May 7, 2026 18:34
Copy link
Copy Markdown
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

Copilot reviewed 33 out of 33 changed files in this pull request and generated 6 comments.

Comments suppressed due to low confidence (1)

lib/rdk/readBTAddress-generic.sh:32

  • bluetooth_mac is only set when BLUETOOTH_ENABLED=true; otherwise this script echoes an unset/empty value. That can propagate an empty Bluetooth MAC to callers (e.g., device details collection). Initialize bluetooth_mac to a safe default (like 00:00:00:00:00:00) and quote the echo output.

[Service]
Type=exec
Type=simple
ExecStart= /bin/sh -c '/lib/rdk/NM_Bootstrap.sh'
Comment thread lib/rdk/startStunnel.sh
Comment on lines +158 to +173
# Create a named pipe
PIPE=$(mktemp -u)
if ! mkfifo "$PIPE" 2>/dev/null; then
echo_t "STUNNEL: ERROR - Failed to create named pipe"
fi

# Open the pipe using the available FD, with error handling
if ! eval "exec $FD_NUMBER<>$PIPE" 2>/dev/null; then
echo_t "STUNNEL: ERROR - Failed to open pipe with file descriptor"
fi

# Removing the pipe after opening
rm "$PIPE"

# Writing passcode to open file descriptor
echo "$(eval "$PASSCODE")" >&$FD_NUMBER &
Comment on lines +295 to +308
#Reset tmp parameters to default values only after both V4 and V6 are measured (on V6 call).
#Resetting on V4 check alone would be premature because packetsLostipv6 is still 0 (script init)
#at that point, causing FirstPacketLossTime to be incorrectly cleared before V6 is measured.
#Reset if either V4 or V6 is below the reassociate tolerance, indicating recovery on at least one path.
if [ "$version" = "V6" ] && { [ "$packetsLostipv4" -lt "$WifiReassociateTolerance" ] || [ "$packetsLostipv6" -lt "$WifiReassociateTolerance" ]; }; then
echo "$(/bin/timestamp) [DEBUG_NCR] checkPacketLoss: BELOW TOLERANCE returning 0 - resetting FirstPacketLossTime/PacketLossLogTimeStamp/IsWifiReassociated. wifiDriverErrors=$wifiDriverErrors" >> "$logsFile"
FirstPacketLossTime=0
PacketLossLogTimeStamp=0
EthernetLogTimeStamp=0
IsWifiReassociated=0
[ "$wifiDriverErrors" -eq 0 ] && IsWifiReset=0 #Make IsWifiReset=0 only when there is no wifidriverissue
else
echo "$(/bin/timestamp) [DEBUG_NCR] checkPacketLoss: BELOW TOLERANCE returning 0 - skipping reset (version=$version, waiting for V6 measurement). wifiDriverErrors=$wifiDriverErrors" >> "$logsFile"
fi
Comment thread lib/rdk/NM_Bootstrap.sh
Comment on lines 114 to +122
if [ -d /opt/secure/NetworkManager/system-connections ]; then
rm -rf /opt/secure/NetworkManager/system-connections/*
echo "`/bin/timestamp` :$0: Listing the connection profiles in device: " >> /opt/logs/NMMonitor.log
ls -lh /opt/secure/NetworkManager/system-connections >> /opt/logs/NMMonitor.log
echo "`/bin/timestamp` :$0: Deleting existing wifi profiles if any..." >> /opt/logs/NMMonitor.log
for f in /opt/secure/NetworkManager/system-connections/*; do
if grep -q "type=wifi" "$f"; then
rm -f "$f"
fi
done
Comment thread lib/rdk/alertSystem.sh
Comment on lines +20 to +22
# Purpose: This script is used to backup the Logs
# Scope: RDK devices
# Usage: This script is triggered by systemd service
echo "Logging for Yocto platforms..."
/bin/timestamp
uptime
uptime
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.