Skip to content

down network interfaces behind USB ports#21

Open
LaVillaStargato wants to merge 1 commit intopre-releasefrom
network_iface
Open

down network interfaces behind USB ports#21
LaVillaStargato wants to merge 1 commit intopre-releasefrom
network_iface

Conversation

@LaVillaStargato
Copy link
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
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
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
Contributor Author

@LaVillaStargato LaVillaStargato Feb 18, 2026

Choose a reason for hiding this comment

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

Also, one-or-more ? matching seems to not work in my bash, while {1,} does. That's why I'm using {1,}.

(base) egumtow@pc100148:~/code/linux-diskless-builder/custom_files$ if [[ "enp0s20f0u76543u4" =~ enp[0-9]{1,}s[0-9]{1,}f[0-9]u[0-9]{1,} ]] ; then echo hey ; fi
hey

(base) egumtow@pc100148:~/code/linux-diskless-builder/custom_files$ if [[ "enp0s20f0u76543u4" =~ enp[0-9]?s[0-9]?f[0-9]u[0-9]? ]] ; then echo hey ; fi
(base) egumtow@pc100148:~/code/linux-diskless-builder/custom_files$

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

Comments