Issues where Eth0 Isn't listed correctly.#3
Open
kicker22004 wants to merge 2 commits intomdrjr:masterfrom
Open
Issues where Eth0 Isn't listed correctly.#3kicker22004 wants to merge 2 commits intomdrjr:masterfrom
kicker22004 wants to merge 2 commits intomdrjr:masterfrom
Conversation
Author
|
Updated your Readme, Thanks for this program by the way. I'm currently using it as a base for my BSCC program for the Cloudshell. |
Obihoernchen
suggested changes
Aug 12, 2017
| # Network Interface: eth0, wlan0, .... | ||
| export NETIF="eth0" | ||
| #Find Default eth0 device for new systemd configurations... | ||
| ETHFIND=$(ifconfig | grep Link | awk '{print $1}' | sort | egrep -v 'inet6|lo') |
There was a problem hiding this comment.
This fails with newer ifconfig versions and ifconfig is deprecated.
There was a problem hiding this comment.
What's about: ls -1 /sys/class/net | grep -v lo
There was a problem hiding this comment.
Or better with just one command: find /sys/class/net -type l ! -name lo -printf '%f'
There was a problem hiding this comment.
ifconfig | awk 'NR==1{print $1}' works as well.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This will allow your for 14.04 to still function correctly with the Eth0 name change.