Skip to content

Conversation

@snayak002c
Copy link
Contributor

Reverts #152. Merged by mistake

Copilot AI review requested due to automatic review settings December 18, 2025 18:53
@snayak002c snayak002c requested review from a team as code owners December 18, 2025 18:53
Copy link
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 reverts changes from PR #152 that were merged by mistake. The revert removes WNXL11BWL-specific SSH configuration and restores previous code patterns.

Key Changes:

  • Removes WNXL11BWL device-specific SSH listening configuration block (lines 210-222 in original)
  • Removes WNXL11BWL from device type conditional check (line 257)
  • Reverts variable comparison quoting and echo command changes (lines 51, 258)

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

LANIPV6Support=`sysevent get LANIPv6GUASupport`
DEVICETYPE=$(dmcli eRT getv Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Identity.DeviceType | grep value | cut -d ":" -f 3 | tr -d ' ' | tr -s ' ' | tr '[:lower:]' '[:upper:]')
if [ "$DEVICETYPE" = "TEST" ] && [ "$USE_DYNAMICKEYING" = "TRUE" ]; then
if [ $DEVICETYPE = "TEST" ] && [ $USE_DYNAMICKEYING = "TRUE" ]; then
Copy link

Copilot AI Dec 18, 2025

Choose a reason for hiding this comment

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

The removal of quotes around variable comparisons makes the script vulnerable to errors when variables are empty or contain spaces. Shell scripts should quote variables in comparisons to prevent word splitting and glob expansion. This pattern is inconsistent with the rest of the file which consistently uses quoted variables (e.g., line 59: [ "$BOX_TYPE" = "HUB4" ]).

Suggested change
if [ $DEVICETYPE = "TEST" ] && [ $USE_DYNAMICKEYING = "TRUE" ]; then
if [ "$DEVICETYPE" = "TEST" ] && [ "$USE_DYNAMICKEYING" = "TRUE" ]; then

Copilot uses AI. Check for mistakes.
if ([ "$MANUFACTURE" = "Technicolor" ] || [ "$MODEL_NUM" = "SG417DBCT" ] || [ "$BOX_TYPE" = "WNXL11BWL" ]) ; then
echo_t "dropbear -E -s -K 60 -b /etc/sshbanner.txt ${commandString} -r ${DROPBEAR_PARAMS_1} -r ${DROPBEAR_PARAMS_2} -a -P ${PID_FILE}"
if ([ "$MANUFACTURE" = "Technicolor" ] || [ "$MODEL_NUM" = "SG417DBCT" ]) ; then
echo dropbear -E -s -K 60 -b /etc/sshbanner.txt ${commandString} -r ${DROPBEAR_PARAMS_1} -r ${DROPBEAR_PARAMS_2} -a -P ${PID_FILE}
Copy link

Copilot AI Dec 18, 2025

Choose a reason for hiding this comment

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

The change from echo_t to plain echo is inconsistent with the rest of the file. Throughout this script, echo_t is used for logging purposes (see lines 53, 56, 242, 246, 248, 252, 254, 270, 273, 275, etc.). Using plain echo here means this debug statement won't be properly logged with timestamps like other messages in the script.

Suggested change
echo dropbear -E -s -K 60 -b /etc/sshbanner.txt ${commandString} -r ${DROPBEAR_PARAMS_1} -r ${DROPBEAR_PARAMS_2} -a -P ${PID_FILE}
echo_t dropbear -E -s -K 60 -b /etc/sshbanner.txt ${commandString} -r ${DROPBEAR_PARAMS_1} -r ${DROPBEAR_PARAMS_2} -a -P ${PID_FILE}

Copilot uses AI. Check for mistakes.
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.

2 participants