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>
Sysint 4.5.4 release for upload STB script removal
RDK-61128 : Remove the Logupload Scripts ported to C
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 23 out of 23 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| else | ||
| if [ "$packetsLostipv4" -ne 0 ] && [ "$packetsLostipv6" -ne 0 ]; then | ||
| #Send telemetry notification for 10% packet loss | ||
| echo "$(/bin/timestamp) Current Packet loss is WIFIV_WARN_PL_10PERC" >> "$logsFile" | ||
| t2CountNotify "WIFIV_WARN_PL_10PERC" | ||
| fi |
There was a problem hiding this comment.
The 10% packet-loss telemetry is only emitted when both IPv4 and IPv6 packet loss are non-zero. If one stack has 10% loss and the other has 0%, this branch won’t notify even though there is measurable packet loss. Consider using an OR condition (or check the current $version’s loss) so partial-stack loss still triggers the 10% notification.
| 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" |
There was a problem hiding this comment.
The else-branch debug log message says "BELOW TOLERANCE" even when the code path is taken because version != V6 (i.e., it’s waiting for the V6 measurement), not because loss is below tolerance. Update the message so logs accurately reflect why the reset is skipped.
| echo "$(/bin/timestamp) [DEBUG_NCR] checkPacketLoss: BELOW TOLERANCE returning 0 - skipping reset (version=$version, waiting for V6 measurement). wifiDriverErrors=$wifiDriverErrors" >> "$logsFile" | |
| echo "$(/bin/timestamp) [DEBUG_NCR] checkPacketLoss: skipping reset (version=$version, waiting for V6 measurement). wifiDriverErrors=$wifiDriverErrors" >> "$logsFile" |
| 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 | ||
|
|
||
| # Interface just appeared - start if not running | ||
| if pgrep -f "avahi-autoipd.*$INTERFACE" > /dev/null 2>&1; then | ||
| Log "avahi-autoipd already running for $INTERFACE" | ||
| exit 0 | ||
| fi | ||
|
|
||
| # Start avahi-autoipd | ||
| /usr/sbin/avahi-autoipd --daemonize --syslog "$INTERFACE" | ||
| Log "Started avahi-autoipd for $INTERFACE" | ||
| exit 0 |
There was a problem hiding this comment.
This script was added but is not referenced anywhere else in the repository (no systemd unit / dispatcher hook calls it). If it’s intended to be used, add the integration point; otherwise consider removing it to avoid dead code drift.
* RDKEMW-15186 : [RDK-E] [TCHXi6] estb mac address is incorrect * Add source --------- Co-authored-by: Abhinav P V <Abhinav_Valappil@comcast.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 24 out of 24 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if [ -f "/tmp/checkpacketloss" ] ; then | ||
| if [ "$version" = "V4" ] ; then | ||
| gwIp=$(cat /tmp/checkpacketloss) | ||
| pingCmd="ping" | ||
| fi | ||
| else | ||
| #print ipv4 Gateway logs after $GatewayLoggingInterval | ||
| if [ "$(($GatewayLogTimeStamp+$GatewayLoggingInterval))" -le "$currentTime" ] ; then | ||
| echo "$(/bin/timestamp) TELEMETRY_GATEWAY_NO_ROUTE_V4" >> "$logsFile" | ||
| t2CountNotify "WIFIV_INFO_NOV4ROUTE" | ||
| if [ "$version" = "V4" ] ; then | ||
| gwIp=$(/sbin/ip -4 route | awk '/default/ { print $3 }' | head -n1 | awk '{print $1;}') | ||
| pingCmd="ping" | ||
| elif [ "$version" = "V6" ] ; then | ||
| gwIp=$(/sbin/ip -6 route | awk '/default/ { print $3 }' | head -n1 | awk '{print $1;}') | ||
| gwIp_interface=$(/sbin/ip -6 route | awk '/default/ { print $5 }' | head -n1 | awk '{print $1;}') | ||
| pingCmd="ping6 -I $gwIp_interface" | ||
| fi | ||
| fi |
There was a problem hiding this comment.
When /tmp/checkpacketloss exists, the V6 invocation of checkPacketLoss() leaves gwIp/pingCmd unset (they retain values from the prior V4 call). This causes the V6 pass to ping the V4 address and store it into packetsLostipv6, producing incorrect loss calculations. Ensure the file-based override is either applied per-version (provide V6 gateway + interface) or explicitly bypassed/reset gwIp/pingCmd for the V6 call.
| . /etc/include.properties | ||
| . /etc/device.properties | ||
| . $RDK_PATH/utils.sh | ||
| if [ -f /lib/rdk/utils-vendor.sh ]; then |
There was a problem hiding this comment.
The existence check uses the hard-coded path /lib/rdk/utils-vendor.sh, but the script is sourced via $RDK_PATH/utils-vendor.sh. If $RDK_PATH differs from /lib/rdk, this will either source a different file than the one checked for, or fail to source even though the file exists. Use a single canonical path for both the check and the source (preferably based on $RDK_PATH).
| if [ -f /lib/rdk/utils-vendor.sh ]; then | |
| if [ -f "$RDK_PATH/utils-vendor.sh" ]; then |
| bluetooth_mac=`sh /lib/rdk/readBTAddress-vendor.sh` | ||
| else | ||
| bluetooth_mac=`sh /lib/rdk/readBTAddress-generic.sh` | ||
| fi | ||
|
|
There was a problem hiding this comment.
getBluetoothMac() initializes bluetooth_mac to 00:00:00:00:00:00 but then unconditionally overwrites it with the output of readBTAddress-*.sh. If Bluetooth is disabled (or the helper returns empty), this will return an empty string instead of the default. Consider only overwriting the default when the helper returns a non-empty value, or have the helper always emit a valid default.
| bluetooth_mac=`sh /lib/rdk/readBTAddress-vendor.sh` | |
| else | |
| bluetooth_mac=`sh /lib/rdk/readBTAddress-generic.sh` | |
| fi | |
| bt_from_helper=`sh /lib/rdk/readBTAddress-vendor.sh` | |
| else | |
| bt_from_helper=`sh /lib/rdk/readBTAddress-generic.sh` | |
| fi | |
| if [ -n "$bt_from_helper" ]; then | |
| bluetooth_mac="$bt_from_helper" | |
| fi |
| fi | ||
|
|
||
| if [ -f "$LOGUPLOAD_SCRIPT" ]; then | ||
| if [ -f "$LOG_UPLOAD_BIN_PATH" ]; then |
There was a problem hiding this comment.
This check only verifies that the logupload path exists (-f). If the file exists but is not executable, the subsequent invocation will fail. Consider using -x (or -f + chmod/explicit interpreter) so the check matches the way the binary is used.
| if [ -f "$LOG_UPLOAD_BIN_PATH" ]; then | |
| if [ -x "$LOG_UPLOAD_BIN_PATH" ]; then |
| # Signal telemetry2_0 to send out any pending messages before reboot | ||
| rebootLog "Signal telemetry2_0 to send out any pending messages before reboot" | ||
| killall -s SIGUSR1 telemetry2_0 | ||
| killall -s SIGIO telemetry2_0 |
There was a problem hiding this comment.
The comment says telemetry2_0 is being signaled to flush pending messages, but the signal was changed from SIGUSR1 to SIGIO. SIGIO is typically used for async I/O notifications and many processes don’t handle it; if telemetry2_0 doesn’t explicitly trap SIGIO, this will have no effect. Please confirm telemetry2_0 expects SIGIO here (or revert to the previously used signal / update the comment accordingly).
| killall -s SIGIO telemetry2_0 | |
| killall -s SIGUSR1 telemetry2_0 |
| Environment="LOG_PATH=/opt/logs" | ||
| Environment="RDK_PATH=/lib/rdk" | ||
| ExecStart=/lib/rdk/backup_logs.sh | ||
| ExecStart=/usr/bin/backup_logs |
There was a problem hiding this comment.
This change switches from /lib/rdk/backup_logs.sh (packaged by this repo) to /usr/bin/backup_logs, but this repository’s Makefile only installs scripts under /lib/rdk and does not install a /usr/bin/backup_logs binary. Please ensure the sysint package declares/ships the dependency that provides /usr/bin/backup_logs (or add install steps here) so the unit doesn’t fail at boot.
| ExecStart=/usr/bin/backup_logs | |
| ExecStart=/lib/rdk/backup_logs.sh |
| 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" |
There was a problem hiding this comment.
LOG_UPLOAD_BIN_PATH now points to /usr/bin/logupload, but this repo doesn’t install a logupload binary (the Makefile only installs /lib/rdk scripts). Please ensure the packaging/dependencies guarantee /usr/bin/logupload is present on target images, or provide an in-package fallback, otherwise maintenance log uploads will regress.
| LOG_UPLOAD_BIN_PATH="/usr/bin/logupload" | |
| if [ -x "/usr/bin/logupload" ]; then | |
| LOG_UPLOAD_BIN_PATH="/usr/bin/logupload" | |
| elif [ -x "$RDK_PATH/logupload.sh" ]; then | |
| # Fallback to in-package log upload script installed under $RDK_PATH (e.g. /lib/rdk) | |
| LOG_UPLOAD_BIN_PATH="$RDK_PATH/logupload.sh" | |
| else | |
| # No known log upload binary/script found; leave LOG_UPLOAD_BIN_PATH unset/empty | |
| LOG_UPLOAD_BIN_PATH="" | |
| fi |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 28 out of 28 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if [ -f /lib/rdk/utils-vendor.sh ]; then | ||
| . $RDK_PATH/utils-vendor.sh |
There was a problem hiding this comment.
The existence check and the sourced path don’t match. If $RDK_PATH is not /lib/rdk, this will source a different location than the one you validated (or fail even though /lib/rdk/utils-vendor.sh exists). Make the -f check and the . source use the same absolute path, or consistently use $RDK_PATH for both.
| if [ -f /lib/rdk/utils-vendor.sh ]; then | |
| . $RDK_PATH/utils-vendor.sh | |
| if [ -f "$RDK_PATH/utils-vendor.sh" ]; then | |
| . "$RDK_PATH/utils-vendor.sh" |
| for i in {1..9}; do | ||
| if ([ "$packetsLostipv4" -ge $((i*10)) ] && [ "$packetsLostipv4" -lt $((i*10+10)) ]) || ([ "$packetsLostipv6" -ge $((i*10)) ] && [ "$packetsLostipv6" -lt $((i*10+10)) ]); then | ||
| echo "$(/bin/timestamp) Current Packet loss is WIFIV_WARN_PL_"$((i*10))"PERC" >> "$logsFile" | ||
| t2CountNotify "WIFIV_WARN_PL_"$((i*10))"PERC" | ||
| break | ||
| fi | ||
| done |
There was a problem hiding this comment.
for i in {1..9} relies on brace expansion, which is not guaranteed in /bin/sh across platforms (often requires bash). To keep this script portable under /bin/sh, switch to a POSIX-friendly loop (e.g., iterate over a static list 1 2 3 ... or use seq if available in the target image).
| NotifyAccess=all | ||
| Environment="LOG_PATH=/opt/logs" | ||
| Environment="RDK_PATH=/lib/rdk" | ||
| ExecStart=/lib/rdk/backup_logs.sh | ||
| ExecStart=/usr/bin/backup_logs | ||
| RemainAfterExit=yes |
There was a problem hiding this comment.
This unit still appears to be configured for Type=notify (per hunk header/context) and previously the shell implementation issued systemd-notify --ready. With the new ExecStart=/usr/bin/backup_logs, ensure the binary sends sd_notify(READY=1) (or equivalent) and exits with the expected semantics; otherwise systemd may hang waiting for readiness. If the binary is oneshot/non-notifying, consider changing the unit type accordingly.
|
|
||
| DEVICETYPE=$(tr181 -d Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Identity.DeviceType 2>&1 > /dev/null) | ||
| if [ "$DEVICETYPE" = "TEST" ] && [ "$USE_DYNAMICKEYING" = "TRUE" ]; then | ||
| if [ "$DEVICETYPE" = "TEST" ]; then |
There was a problem hiding this comment.
This change removes the USE_DYNAMICKEYING gate and forces dev authorized keys for any device reporting DeviceType=TEST. That broadens when dev credentials are accepted. If the intent is to only switch keys when dynamic keying is enabled (or when a separate device/feature flag is set), reintroduce an explicit gating condition to avoid unintentionally weakening SSH authorization in environments where DeviceType may be misconfigured.
| if [ "$DEVICETYPE" = "TEST" ]; then | |
| if [ "$DEVICETYPE" = "TEST" ] && [ "$USE_DYNAMICKEYING" = "true" ]; then |
Remove reboot related scripts
* fix: extract integer value from MemAvailable before sending to t2ValNotify Agent-Logs-Url: https://github.com/rdkcentral/sysint/sessions/9a128921-bee2-4756-8abf-414e532b08ea Co-authored-by: yogeswaransky <166126056+yogeswaransky@users.noreply.github.com> * Update system_info_collector.sh * Update system_info_collector.sh --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: yogeswaransky <166126056+yogeswaransky@users.noreply.github.com> Co-authored-by: Priya_Dharshini <priyakathiravan05@gmail.com> Co-authored-by: Shibu Kakkoth Vayalambron <shibu.kakkoth@gmail.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 29 out of 29 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
lib/rdk/readBTAddress-generic.sh:31
- When
BLUETOOTH_ENABLEDis nottrue,bluetooth_macis never initialized, so the script prints an empty string. Callers likegetDeviceDetails.shexpect a deterministic value (often00:00:00:00:00:00) when Bluetooth is unavailable/disabled; consider setting an explicit default and quoting the echo to avoid word-splitting.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: nhanasi <navihansi@gmail.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 |
No description provided.