Skip to content
Closed
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,14 +4,26 @@ 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.0.0](https://github.com/rdkcentral/sysint/compare/3.0.8...4.0.0)

- RDKEMW-10017 : NetworkManager based connectivity check [`#355`](https://github.com/rdkcentral/sysint/pull/355)
- Create NetworkManager_ecfs.conf [`#353`](https://github.com/rdkcentral/sysint/pull/353)
- WNCXIONE-530: Synching changes from support/2.2.0 branch. [`#350`](https://github.com/rdkcentral/sysint/pull/350)
- RDKEMW-9343: Update boot_FSR as part of OPS_TRIGGERED reasons [`#343`](https://github.com/rdkcentral/sysint/pull/343)
- RDKEMW-9675 FSR needs to remove NM profile in RDKE also [`#346`](https://github.com/rdkcentral/sysint/pull/346)
- Merge tag '3.0.8' into develop [`417596d`](https://github.com/rdkcentral/sysint/commit/417596d0e8d3f71c8b98c7b36a32c205e16cd760)

#### [3.0.8](https://github.com/rdkcentral/sysint/compare/3.0.7...3.0.8)

> 24 October 2025

- RDKE-900 RDKEMW-4899: Default to MTLS connection on all endpoints [`#322`](https://github.com/rdkcentral/sysint/pull/322)
- Rebase with develop [`#336`](https://github.com/rdkcentral/sysint/pull/336)
- Rebase with develop [`#329`](https://github.com/rdkcentral/sysint/pull/329)
- Rebase with develop [`#328`](https://github.com/rdkcentral/sysint/pull/328)
- Rebase with develop [`#325`](https://github.com/rdkcentral/sysint/pull/325)
- Rebase with develop [`#324`](https://github.com/rdkcentral/sysint/pull/324)
- 3.0.8 release changelog updates [`da072c3`](https://github.com/rdkcentral/sysint/commit/da072c3568b1fa37d2ddcb6411e4d471d3dfa646)
- Merge tag '3.0.7' into develop [`e3c6a47`](https://github.com/rdkcentral/sysint/commit/e3c6a4787fe5546e11041d61c21036cb15589c10)

#### [3.0.7](https://github.com/rdkcentral/sysint/compare/3.0.6...3.0.7)
Expand Down
41 changes: 36 additions & 5 deletions lib/rdk/NM_Bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@
# limitations under the License.
##############################################################################

WIFI_WPA_SUPPLICANT_CONF="/opt/secure/wifi/wpa_supplicant.conf"
RDK_PROFILE=$(grep "RDK_PROFILE" /etc/device.properties | cut -d '=' -f 2)
RDKV_SUPP_CONF="/opt/secure/wifi/wpa_supplicant.conf"

if [ -f $WIFI_WPA_SUPPLICANT_CONF ]; then
SSID=$(cat $WIFI_WPA_SUPPLICANT_CONF | grep -w ssid= | cut -d '"' -f 2)
PSK_LINE=$(grep psk= "$WIFI_WPA_SUPPLICANT_CONF")

if [ -f $RDKV_SUPP_CONF ]; then
SSID=$(cat $RDKV_SUPP_CONF | grep -w ssid= | cut -d '"' -f 2)
PSK_LINE=$(grep psk= "$RDKV_SUPP_CONF")

# Case 1: Quoted passphrase
if [[ "$PSK_LINE" =~ psk=\"(.+)\" ]]; then
Expand All @@ -37,6 +39,35 @@ if [ -f $WIFI_WPA_SUPPLICANT_CONF ]; then
else
PSK=""
fi
echo "`/bin/timestamp` :$0: Removed nmcli SSID connect" >> /opt/logs/NMMonitor.log
sed -i '/network={/,/}/d' /opt/secure/wifi/wpa_supplicant.conf
fi

if [ -z $SSID ]; then

Copilot AI Nov 3, 2025

Copy link

Choose a reason for hiding this comment

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

Variable $SSID should be quoted to properly handle empty values. The current syntax [ -z $SSID ] will fail if SSID is unset or contains whitespace. Use [ -z \"$SSID\" ] instead.

Copilot uses AI. Check for mistakes.
echo "`/bin/timestamp` :$0: No SSID found in supplicant conf" >> /opt/logs/NMMonitor.log
echo "`/bin/timestamp` :$0: Trying with previously configured settings" >> /opt/logs/NMMonitor.log

if [ ! -d /opt/secure/NetworkManager/system-connections ]; then
mkdir -p /opt/secure/NetworkManager/system-connections
fi
if [ -d /opt/NetworkManager/system-connections ]; then
cp /opt/NetworkManager/system-connections/* /opt/secure/NetworkManager/system-connections/

Copilot AI Nov 3, 2025

Copy link

Choose a reason for hiding this comment

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

The wildcard expansion * will fail if the directory is empty, causing the script to error. Add a check to verify files exist before copying, or use a safer pattern like cp -r /opt/NetworkManager/system-connections/. /opt/secure/NetworkManager/system-connections/ 2>/dev/null || true.

Suggested change
cp /opt/NetworkManager/system-connections/* /opt/secure/NetworkManager/system-connections/
cp -r /opt/NetworkManager/system-connections/. /opt/secure/NetworkManager/system-connections/ 2>/dev/null || true

Copilot uses AI. Check for mistakes.
rm -rf /opt/NetworkManager/system-connections/*
fi
nmcli conn reload
else
if [ -d /opt/NetworkManager/system-connections ]; then
rm -rf /opt/NetworkManager/system-connections/*
fi
if [ "$RDK_PROFILE" == "TV" ]; then
echo "`/bin/timestamp` :$0: Migrating Wifi credentials for TVs from NM_Bootsrtap" >> /opt/logs/NMMonitor.log

Copilot AI Nov 3, 2025

Copy link

Choose a reason for hiding this comment

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

Corrected spelling of 'NM_Bootsrtap' to 'NM_Bootstrap'.

Suggested change
echo "`/bin/timestamp` :$0: Migrating Wifi credentials for TVs from NM_Bootsrtap" >> /opt/logs/NMMonitor.log
echo "`/bin/timestamp` :$0: Migrating Wifi credentials for TVs from NM_Bootstrap" >> /opt/logs/NMMonitor.log

Copilot uses AI. Check for mistakes.
fi
if [ -z $PSK ]; then

Copilot AI Nov 3, 2025

Copy link

Choose a reason for hiding this comment

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

Variable $PSK should be quoted to properly handle empty values. The current syntax [ -z $PSK ] will fail if PSK is unset or contains whitespace. Use [ -z \"$PSK\" ] instead.

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

Copilot uses AI. Check for mistakes.
#connect to wifi
nmcli conn add type wifi con-name "$SSID" autoconnect yes ifname wlan0 ssid "$SSID"
nmcli conn reload
else
#connect to wifi
nmcli conn add type wifi con-name "$SSID" autoconnect yes ifname wlan0 ssid "$SSID" wifi-sec.key-mgmt wpa-psk wifi-sec.psk "$PSK"
nmcli conn reload
fi
fi
8 changes: 1 addition & 7 deletions lib/rdk/NM_Dispatcher.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,9 @@ interfaceName=$1
interfaceStatus=$2

if [ "$interfaceStatus" = "up" ]; then
/usr/bin/nm-online -q -t 60 # If Network manager is not online wait for 60 sec. TODO: Revisit this during connectivity check enable time

Copilot AI Nov 3, 2025

Copy link

Choose a reason for hiding this comment

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

Remove this empty line that was left behind after removing the nm-online command. The blank line with only whitespace reduces code clarity.

Suggested change

Copilot uses AI. Check for mistakes.
CON_STATE=$(nmcli -t -f GENERAL.STATE device show "$interfaceName" 2>/dev/null | cut -d: -f2)
NMdispatcherLog "Connection state of interface $interfaceName=$CON_STATE"
if [ "$CON_STATE" = "100 (connected)" ] || [ "$CON_STATE" = "120 (connected (site only))" ]; then
NMdispatcherLog "Connection state of $interfaceName is connected."
sh /lib/rdk/connectivitycheck.sh &
else
NMdispatcherLog "Connection state of $interfaceName Up But Not Fully connected."
fi
fi

if [ "x$interfaceName" != "x" ] && [ "$interfaceName" != "lo" ]; then
Expand Down
79 changes: 0 additions & 79 deletions lib/rdk/connectivitycheck.sh

This file was deleted.

2 changes: 2 additions & 0 deletions lib/rdk/factory-reset.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ if [ -d /opt/upnp ]; then rm -rf /opt/upnp/*;fi
if [ -L /opt/www/htmldiag ]; then rm -f /opt/www/htmldiag;fi
if [ -f /opt/user_preferences.conf ];then rm -rf /opt/user_preferences.conf; fi
if [ -f /opt/continuewatching.json ];then rm -rf /opt/continuewatching.json ; fi
if [ -d /opt/NetworkManager ];then rm -rf /opt/NetworkManager ; fi
if [ -d /opt/secure/NetworkManager ];then rm -rf /opt/secure/NetworkManager ; fi

if [ -f /opt/secure/Apparmor_blocklist ];then rm -rf /opt/secure/Apparmor_blocklist ; fi

Expand Down
2 changes: 1 addition & 1 deletion lib/rdk/rebootNow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ CDLFILE=$(cat /opt/cdl_flashed_file_name)
PREV_CDLFILE=$(cat /tmp/currently_running_image_name)
# Define Reasons for APP_TRIGGERED, OPS_TRIGGERED and MAINTENANCE_TRIGGERED cases
APP_TRIGGERED_REASONS=(Servicemanager systemservice_legacy WarehouseReset WarehouseService HrvInitWHReset HrvColdInitReset HtmlDiagnostics InstallTDK StartTDK TR69Agent SystemServices Bsu_GUI SNMP CVT_CDL Nxserver DRM_Netflix_Initialize hrvinit PaceMFRLibrary)
OPS_TRIGGERED_REASONS=(ScheduledReboot RebootSTB.sh FactoryReset UpgradeReboot_firmwareDwnld.sh UpgradeReboot_restore XFS wait_for_pci0_ready websocketproxyinit NSC_IR_EventReboot host_interface_dma_bus_wait usbhotplug Receiver_MDVRSet Receiver_VidiPath_Enabled Receiver_Toggle_Optimus S04init_ticket Network-Service monitor.sh ecmIpMonitor.sh monitorMfrMgr.sh vlAPI_Caller_Upgrade ImageUpgrade_rmf_osal ImageUpgrade_mfr_api ImageUpgrade_updateNewImage.sh ImageUpgrade_userInitiatedFWDnld.sh ClearSICache tr69hostIfReset hostIf_utils hostifDeviceInfo HAL_SYS_Reboot UpgradeReboot_deviceInitiatedFWDnld.sh UpgradeReboot_rdkvfwupgrader UpgradeReboot_ipdnl.sh PowerMgr_Powerreset PowerMgr_coldFactoryReset DeepSleepMgr PowerMgr_CustomerReset PowerMgr_PersonalityReset Power_Thermmgr PowerMgr_Plat HAL_CDL_notify_mgr_event vldsg_estb_poll_ecm_operational_state BcmIndicateEcmReset SASWatchDog BP3_Provisioning eMMC_FW_UPGRADE BOOTLOADER_UPGRADE cdl_service BCMCommandHandler BRCM_Image_Validate docsis_mode_check.sh tch_nvram.sh Receiver CANARY_Update)
OPS_TRIGGERED_REASONS=(ScheduledReboot RebootSTB.sh FactoryReset UpgradeReboot_firmwareDwnld.sh UpgradeReboot_restore XFS wait_for_pci0_ready websocketproxyinit NSC_IR_EventReboot host_interface_dma_bus_wait usbhotplug Receiver_MDVRSet Receiver_VidiPath_Enabled Receiver_Toggle_Optimus S04init_ticket Network-Service monitor.sh ecmIpMonitor.sh monitorMfrMgr.sh vlAPI_Caller_Upgrade ImageUpgrade_rmf_osal ImageUpgrade_mfr_api ImageUpgrade_updateNewImage.sh ImageUpgrade_userInitiatedFWDnld.sh ClearSICache tr69hostIfReset hostIf_utils hostifDeviceInfo HAL_SYS_Reboot UpgradeReboot_deviceInitiatedFWDnld.sh UpgradeReboot_rdkvfwupgrader UpgradeReboot_ipdnl.sh PowerMgr_Powerreset PowerMgr_coldFactoryReset DeepSleepMgr PowerMgr_CustomerReset PowerMgr_PersonalityReset Power_Thermmgr PowerMgr_Plat HAL_CDL_notify_mgr_event vldsg_estb_poll_ecm_operational_state BcmIndicateEcmReset SASWatchDog BP3_Provisioning eMMC_FW_UPGRADE BOOTLOADER_UPGRADE cdl_service BCMCommandHandler BRCM_Image_Validate docsis_mode_check.sh tch_nvram.sh Receiver CANARY_Update boot_FSR)
MAINTENANCE_TRIGGERED_REASONS=(AutoReboot.sh PwrMgr)
pid_file="/tmp/.rebootNow.pid"
customReason="Unknown"
Expand Down
2 changes: 2 additions & 0 deletions systemd_units/NetworkManager_ecfs.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[Unit]

Check failure on line 1 in systemd_units/NetworkManager_ecfs.conf

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'systemd_units/NetworkManager_ecfs.conf' (Match: rdk/components/generic/netmonitor/rdk/components/generic/netmonitor/e99bec6, full file, url: https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/netmonitor/+archive/e99bec69e1cea9464d956cd0109277d48a9b7d09.tar.gz, file: conf/nlmon.conf)
After=securemount.service
4 changes: 2 additions & 2 deletions systemd_units/coredump-secure-upload.service
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
[Unit]
Description=COREDUMP UPLOAD

After=network-up.target tr69hostif.service
Requires=network-up.target
After=network-online.target tr69hostif.service
Requires=network-online.target

[Service]
ExecStart=/lib/rdk/uploadDumps.sh "" 1 secure
Expand Down
4 changes: 2 additions & 2 deletions systemd_units/coredump-upload.service
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
[Unit]
Description=COREDUMP UPLOAD

After=network-up.target
Requires=network-up.target
After=network-online.target
Requires=network-online.target

[Service]
ExecStart=/lib/rdk/uploadDumps.sh "" 1
Expand Down
4 changes: 2 additions & 2 deletions systemd_units/minidump-secure-upload.service
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
[Unit]
Description=MINIDUMP UPLOAD

After=network-up.target tr69hostif.service
Requires=network-up.target
After=network-online.target tr69hostif.service
Requires=network-online.target

[Service]
ExecStart=/lib/rdk/uploadDumps.sh "" 0 secure
Expand Down
4 changes: 2 additions & 2 deletions systemd_units/minidump-upload.service
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
[Unit]
Description=MINIDUMP UPLOAD

After=network-up.target
Requires=network-up.target
After=network-online.target
Requires=network-online.target

[Service]
ExecStart=/lib/rdk/uploadDumps.sh "" 0
Expand Down
8 changes: 8 additions & 0 deletions systemd_units/notify-network-ready.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[Unit]
Description=Log Internet connectivity and Trigger network target
After=dbus.service

[Service]
Type=oneshot
ExecStartPre=/bin/touch /tmp/connectivity_check_done
ExecStart=/lib/rdk/logMilestone.sh "INTERNET_FULLY_CONNECTED"
Loading