rebase#432
Conversation
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
|
I have read the CLA Document and I hereby sign the CLA 12 out of 13 committers have signed the CLA. |
There was a problem hiding this comment.
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.shand refactored its functionality intoNM_Dispatcher.shandNM_preDown.sh - Added support for a binary log upload implementation with fallback to script-based approach in
Start_MaintenanceTasks.sh - Added
com.comcast.viper_ipato warehouse testing exceptions inwh_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.
| 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 |
There was a problem hiding this comment.
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.
| 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 |
| 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 |
There was a problem hiding this comment.
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.
| 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 |
| 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" & |
There was a problem hiding this comment.
Trailing whitespace after the ampersand on this line. This is inconsistent with line 216 which has the same command structure without trailing whitespace.
| 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" & |
| 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" & |
There was a problem hiding this comment.
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.
| 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 |
There was a problem hiding this comment.
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.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
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.shwas 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.
| 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 |
| # 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 & |
| for f in /opt/secure/NetworkManager/system-connections/*; do | ||
| if grep -q "type=wifi" "$f"; then | ||
| rm -f "$f" | ||
| fi | ||
| done |
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>
There was a problem hiding this comment.
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_ENABLEDis nottrue,bluetooth_macis never initialized but the script still echoes it, resulting in an empty string. Since callers (e.g.,getDeviceDetails.sh) may expect a default MAC like00:00:00:00:00:00, consider explicitly setting a default when Bluetooth is disabled or whengetDeviceBluetoothMacreturns empty.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| for f in /opt/secure/NetworkManager/system-connections/*; do | ||
| if grep -q "type=wifi" "$f"; then | ||
| rm -f "$f" | ||
| fi | ||
| done |
| # 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 & |
| > 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) |
| 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 |
… sysint (#522) Co-authored-by: mtirum011 <madhubabu_tirumala@comcast.com>
There was a problem hiding this comment.
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.
| 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 |
| 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 |
| if [ -f "/tmp/checkpacketloss" ] ; then | ||
| if [ "$version" = "V4" ] ; then | ||
| gwIp=$(cat /tmp/checkpacketloss) | ||
| pingCmd="ping" | ||
| fi |
| 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 |
| # 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" |
… 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>
… crashes (#539) Co-authored-by: mtirum011 <madhubabu_tirumala@comcast.com> Co-authored-by: nhanasi <navihansi@gmail.com>
There was a problem hiding this comment.
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_macis only set whenBLUETOOTH_ENABLEDis true; otherwise this script echoes an empty string. SincegetDeviceDetails.shuses this output directly, Bluetooth-disabled devices will report an empty Bluetooth MAC (overwriting its default). Initializebluetooth_macto a safe default (e.g., 00:00:00:00:00:00) and only override it whengetDeviceBluetoothMacreturns a non-empty value.
| 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 |
| # 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 & |
* 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>
There was a problem hiding this comment.
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_macis only set whenBLUETOOTH_ENABLED=true; otherwise this script echoes an unset/empty value. That can propagate an empty Bluetooth MAC to callers (e.g., device details collection). Initializebluetooth_macto a safe default (like00:00:00:00:00:00) and quote theechooutput.
| [Service] | ||
| Type=exec | ||
| Type=simple | ||
| ExecStart= /bin/sh -c '/lib/rdk/NM_Bootstrap.sh' |
| # 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 & |
| #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 |
| 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 |
| # 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 |
No description provided.