down network interfaces behind USB ports#21
down network interfaces behind USB ports#21LaVillaStargato wants to merge 1 commit intopre-releasefrom
Conversation
| 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 |
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
Curious - why is your desktop using domain 10? My assumption is anything besides 0 would be for virtualization.
I'll make the change.
There was a problem hiding this comment.
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$
Minh has an oddball ethernet interface that he would like downed at boot-up.