Skip to content

Conversation

@cmuhammedrafi
Copy link
Contributor

updated to enable WiFi when BootType as BOOT_MIGRATION

updated to enable WiFi when BootType as BOOT_MIGRATION

Signed-off-by: Muhammed Rafi C <muhammed_rafi@comcast.com>
@cmuhammedrafi cmuhammedrafi requested a review from a team as a code owner January 19, 2026 10:44
Copilot AI review requested due to automatic review settings January 19, 2026 10:44
Copy link

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 implements functionality to always enable WiFi and Ethernet interfaces when the system boots with BOOT_TYPE set to BOOT_MIGRATION, allowing network connectivity during migration scenarios. The changes prevent interface disable markers from blocking network access during migration.

Changes:

  • Added systemd unit dependency to ensure proper service ordering
  • Implemented migration boot detection and marker file cleanup
  • Enhanced logging for interface state changes

Reviewed changes

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

File Description
plugin/gnome/systemd/gnome-networkmanager-migration.conf Added service dependency on NM_Bootstrap.service and simplified ExecStartPre command invocation
plugin/gnome/scripts/nm_interface_handler.sh Added BOOT_TYPE detection to remove interface disable markers during migration boot and enhanced logging

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

. /etc/device.properties

# Get BOOT_TYPE
BOOT_TYPE=$(grep "BOOT_TYPE" /tmp/bootType | cut -d '=' -f 2)
Copy link

Copilot AI Jan 19, 2026

Choose a reason for hiding this comment

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

The grep command could fail if /tmp/bootType doesn't exist, leaving BOOT_TYPE empty. Consider adding a check for file existence or providing a default value to prevent unexpected behavior when the file is missing.

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.
Comment on lines 49 to 50
rm -rf "$NSM_ETH_MARKER"
rm -rf "$NSM_WIFI_MARKER"
Copy link

Copilot AI Jan 19, 2026

Choose a reason for hiding this comment

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

Using 'rm -rf' on marker files is unnecessary and could be dangerous if the variable is unexpectedly empty or contains an incorrect path. Use 'rm -f' instead since these are regular files, not directories. The '-r' flag is only needed for recursive directory removal.

Suggested change
rm -rf "$NSM_ETH_MARKER"
rm -rf "$NSM_WIFI_MARKER"
rm -f "$NSM_ETH_MARKER"
rm -f "$NSM_WIFI_MARKER"

Copilot uses AI. Check for mistakes.
@cmuhammedrafi cmuhammedrafi changed the title RDKEMW-12614 Always Enable WiFi upon Migration RDKEMW-12614 : Always Enable WiFi upon Migration Jan 20, 2026
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.

3 participants