Skip to content

down network interfaces behind USB ports#21

Merged
LaVillaStargato merged 2 commits into
pre-releasefrom
network_iface
Feb 27, 2026
Merged

down network interfaces behind USB ports#21
LaVillaStargato merged 2 commits into
pre-releasefrom
network_iface

Conversation

@LaVillaStargato

Copy link
Copy Markdown
Contributor

Minh has an oddball ethernet interface that he would like downed at boot-up.

@LaVillaStargato
LaVillaStargato requested a review from a team February 18, 2026 00:12
fi

# Check if the interface is bridged by USB (PCI -> USB -> ethernet)
if [[ "$1" =~ enp0s[0-9]{1,}f[0-9]u[0-9]{1,} ]] ; then

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should p0 be changed to p[0-9]+ to account for multiple domains? On my desktop I have enp10s0 as one of my interfaces, though it is the motherboard's integrated controller.

I appreciate the detailed comment explaining the naming btw!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Curious - why is your desktop using domain 10? My assumption is anything besides 0 would be for virtualization.

I'll make the change.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Bus address of the ethernet controller is 0a:00.0 (on domain 0, shown with lspci -D)

0000:0a:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 05)

0a should be slot number, so I'm not sure why systemd is doing p10 instead of s10

In any case, thanks for applying the change!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Probably a bug in systemd. Maybe already fixed in newer versions. At any rate, no harm in matching all PCI domains.

In the second commit, I also used one-or-more matching + instead of {1,}. For some reason during my testing I tried ?, but that's 0-or-1 matching, so of course it would not work. Thank you for jostling my brain.

@LaVillaStargato
LaVillaStargato merged commit ae6d0cb into pre-release Feb 27, 2026
1 check passed
@LaVillaStargato
LaVillaStargato deleted the network_iface branch February 27, 2026 20:26
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