Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues where Eth0 Isn't listed correctly. #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kicker22004
Copy link

This will allow your for 14.04 to still function correctly with the Eth0 name change.

@kicker22004
Copy link
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.

@@ -18,7 +18,9 @@ export CONSOLE_FONT="Lat15-Fixed18"
export OUTPUT_CONSOLE="1"

# 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')
Copy link

@Obihoernchen Obihoernchen Aug 12, 2017

Choose a reason for hiding this comment

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

This fails with newer ifconfig versions and ifconfig is deprecated.

Choose a reason for hiding this comment

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

What's about: ls -1 /sys/class/net | grep -v lo

Copy link

@Obihoernchen Obihoernchen Aug 12, 2017

Choose a reason for hiding this comment

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

Or better with just one command: find /sys/class/net -type l ! -name lo -printf '%f'

Choose a reason for hiding this comment

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

ifconfig | awk 'NR==1{print $1}' works as well.

Choose a reason for hiding this comment

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

ifconfig is deprecated

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