-
Notifications
You must be signed in to change notification settings - Fork 22
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
base: master
Are you sure you want to change the base?
Conversation
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') |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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'
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ifconfig is deprecated
This will allow your for 14.04 to still function correctly with the Eth0 name change.