Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,22 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [4.2.2](https://github.com/rdkcentral/sysint/compare/4.2.1...4.2.2)

- RDK-57502 - [RDKE] Migrate Operation Support Log Upload Related Scripts To C Implementation [`#410`](https://github.com/rdkcentral/sysint/pull/410)
- SERXIONE-8331 : Added viper_ipa to exceptions for /media/apps/sky/packages [`#420`](https://github.com/rdkcentral/sysint/pull/420)
- RDK-59247: cleaning up network scripts. [`#402`](https://github.com/rdkcentral/sysint/pull/402)
- RDKEMW-11363: [NM Dispatcher] Reduce repetitive logging [`#415`](https://github.com/rdkcentral/sysint/pull/415)
- Merge tag '4.2.1' into develop [`1df413f`](https://github.com/rdkcentral/sysint/commit/1df413f4f00e87a43eb092c6c57e302d754fba90)
- RDK-59247:Migrate Functionality In Network scripts To Core Modules [`8dd5ab9`](https://github.com/rdkcentral/sysint/commit/8dd5ab957251cfc80d6556560386019ca86088cb)
Comment on lines +7 to +14
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

The CHANGELOG.md for version 4.2.2 does not include any reference to RDKEMW-12562 (the Bluetooth Mac update changes mentioned in the PR title). The changelog references other PRs and tasks but omits the primary purpose of this PR as stated in the title and description.

Copilot uses AI. Check for mistakes.

#### [4.2.1](https://github.com/rdkcentral/sysint/compare/4.2.0...4.2.1)

> 17 December 2025

- RDKEMW-11602: Name resolution error in Peacock App [`#397`](https://github.com/rdkcentral/sysint/pull/397)
- RDKEMW-9242, RDKEMW-11094: Network Migration changes for ENTOS [`#382`](https://github.com/rdkcentral/sysint/pull/382)
- 4.2.1 release changelog updates [`72776fc`](https://github.com/rdkcentral/sysint/commit/72776fce7eb6d9f43dadfacd8ace5e9d397b02fb)
- Merge tag '4.2.0' into develop [`7eeb0e9`](https://github.com/rdkcentral/sysint/commit/7eeb0e9b9c7485d30a57dc5b18587641363b74c2)

#### [4.2.0](https://github.com/rdkcentral/sysint/compare/4.1.0...4.2.0)
Expand Down
47 changes: 41 additions & 6 deletions lib/rdk/Start_MaintenanceTasks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ SWUPDATE_LOG_FILE="$LOG_PATH/swupdate.log"
RFC_BIN="$COMMON_BIN_LOCATION/rfcMgr"
SWUPDATE_BIN="$COMMON_BIN_LOCATION/rdkvfwupgrader"
LOGUPLOAD_SCRIPT="$RDK_PATH/uploadSTBLogs.sh"
LOG_UPLOAD_BIN_PATH="/usr/bin/logupload"

# Log Functions
rfcLog ()
Expand Down Expand Up @@ -175,14 +176,48 @@ runMaintenanceLogUploadTask()

if [ -n "$TriggerType" ] && [ "$TriggerType" -eq "$ON_DEMAND_LOG_UPLOAD" ]; then
logUploadLog "Application triggered on demand log upload"
sh $LOGUPLOAD_SCRIPT "$tftp_server" 1 1 "$uploadOnReboot" "$upload_protocol" "$upload_httplink" "$TriggerType" 2>/dev/null
result=$?
if [ -x "$LOG_UPLOAD_BIN_PATH" ]; then
logUploadLog "Executing logupload binary: $LOG_UPLOAD_BIN_PATH"
"$LOG_UPLOAD_BIN_PATH" "$tftp_server" 1 1 "$uploadOnReboot" "$upload_protocol" "$upload_httplink" "ondemand" >> /opt/logs/dcmscript.log
result=$?
if [ "$result" -eq 0 ]; then
logUploadLog "Binary execution succeeded"
exit 0
else
logUploadLog "Binary execution failed with result=$result; falling back to script"
sh $LOGUPLOAD_SCRIPT "$tftp_server" 1 1 "$uploadOnReboot" "$upload_protocol" "$upload_httplink" "$TriggerType" 2>/dev/null
Comment on lines +181 to +188
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

When using the binary on line 181, the TriggerType is hardcoded to "ondemand", but when falling back to the script on line 188, it uses the variable $TriggerType. This inconsistency could cause different behavior between binary and script execution. The binary should also receive $TriggerType as a parameter to maintain consistent behavior.

Copilot uses AI. Check for mistakes.
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
Comment on lines +188 to +193
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

Inconsistent error handling: line 188 redirects stderr to /dev/null with '2>/dev/null', while line 193 redirects both stdout and stderr with '2>&1'. This difference in error handling between the two code paths could lead to missing error information in logs. Consider using consistent redirection, preferably '2>&1' to capture all output in logs.

Copilot uses AI. Check for mistakes.
result=$?
fi
else
logUploadLog "Log upload triggered from regular execution"
nice -n 19 sh $LOGUPLOAD_SCRIPT "$tftp_server" 1 1 "$uploadOnReboot" "$upload_protocol" "$upload_httplink" &
bg_pid=$!
wait $bg_pid
result=$?
if [ -x "$LOG_UPLOAD_BIN_PATH" ]; then
logUploadLog "Executing logupload binary: $LOG_UPLOAD_BIN_PATH"
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" &
Comment on lines +200 to +209
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

In the regular execution path, the binary invocation on line 200 doesn't pass any TriggerType parameter at all, while the script fallback on line 209 also doesn't pass a TriggerType. However, this is inconsistent with the on-demand execution path (lines 181 and 188) where parameters are passed. The regular execution path binary should receive consistent parameters with the script to ensure proper functionality.

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

There is trailing whitespace after the '&' character at the end of this line. This should be removed for code cleanliness.

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.
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" &
bg_pid=$!
wait $bg_pid
result=$?
fi
Comment on lines 176 to +220
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

The PR title and description indicate this change is about moving bluetooth_mac update from Device Details to Bluetooth Service. However, the major changes in this file are related to log upload binary migration (adding binary execution with fallback to script). These significant log upload changes are not mentioned in the PR description at all. This appears to be unrelated functionality mixed into the PR.

Copilot uses AI. Check for mistakes.
fi
else
logUploadLog "LOGUPLOAD script not found"
Expand Down
3 changes: 2 additions & 1 deletion lib/rdk/getDeviceDetails.sh
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,8 @@ executeServiceRequest()
executeServiceRequest "friendly_id"
executeServiceRequest "build_type"
executeServiceRequest "imageVersion"
executeServiceRequest "bluetooth_mac"
#Moved the Bluetooth Mac address update under bluetooth service post action
#executeServiceRequest "bluetooth_mac"

if [ "$DEVICE_TYPE" != "mediaclient" ]; then
# snmp based / none mediaclient parameter acquisition
Expand Down