Skip to content

Fix: nc call on UC16.#101

Merged
gntzio merged 2 commits intomainfrom
fix-nc-call-uc16
Feb 18, 2026
Merged

Fix: nc call on UC16.#101
gntzio merged 2 commits intomainfrom
fix-nc-call-uc16

Conversation

@gntzio
Copy link
Copy Markdown
Collaborator

@gntzio gntzio commented Feb 18, 2026

Description

UC16 has an ancient netcat-openbsd version:
OpenBSD netcat (Debian patchlevel 1.105-7ubuntu1)
This version does not support -N flag:

nc -N
nc: invalid option -- 'N'
This is nc from the netcat-openbsd package. An alternative nc is available
in the netcat-traditional package.

This PR introduces compliance with older versions of netcat-openbsd.

How to test

To reproduce run nc -N on the UC16 device.

Documentation

https://manpages.debian.org/bookworm/netcat-openbsd/nc.1.en.html

-q seconds
after EOF on stdin, wait the specified number of seconds and then quit. If seconds is negative, wait forever (default). Specifying a non-negative seconds implies -N.

@gntzio gntzio marked this pull request as ready for review February 18, 2026 16:08
@gntzio gntzio requested a review from Copilot February 18, 2026 16:11
Copy link
Copy Markdown

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 fixes compatibility with older versions of netcat-openbsd on UC16 devices by replacing the -N flag (not supported in version 1.105-7ubuntu1) with -q 1, which has equivalent behavior and is supported in both old and new versions.

Changes:

  • Updated the nc command in SnapdAPIClient.get() to use -q 1 instead of -N
  • Updated the corresponding test assertion to match the new command

Reviewed changes

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

File Description
cert-tools/toolbox/src/toolbox/interfaces/snapd.py Changed netcat flags from -N to -q 1 for UC16 compatibility
cert-tools/toolbox/tests/interfaces/test_snapd.py Updated test assertion to verify the new netcat command structure

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

Copy link
Copy Markdown
Contributor

@fernando79513 fernando79513 left a comment

Choose a reason for hiding this comment

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

Thanks a lot for the fix!
LGTM

@gntzio gntzio merged commit fde172d into main Feb 18, 2026
7 checks passed
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