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

Fix full path to /sys/class/net #459

Merged
merged 1 commit into from
Sep 20, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ for dev_dir in /sys/class/net/* ; do
read mac junk <$dev_dir/address # read first word from address file
test "$mac" = "00:00:00:00:00:00" && continue # skip devices without MAC address
# get the driver(s), I care only about the first one, udev prints a list of DRIVER[S]=="module" lines
driver=( $( my_udevinfo -a -p /class/net/$dev | sed -ne '/DRIVER.*=".\+"/s/.*"\(.*\)".*/\1/p') )
driver=( $( my_udevinfo -a -p /sys/class/net/$dev | sed -ne '/DRIVER.*=".\+"/s/.*"\(.*\)".*/\1/p') )
# the array contains a list of drivers, but I care only about the first one

NEW_DEVICES=( "${NEW_DEVICES[@]}" "$dev $mac $driver" )
Expand Down