Skip to content

Commit

Permalink
net-lib: fix set_ifname()
Browse files Browse the repository at this point in the history
/sys/class/$name$num isn't ever going to work; /sys/class/net/$name$num
(e.g. /sys/class/net/ibft0) should work right.
  • Loading branch information
wgwoods authored and haraldh committed Jun 13, 2013
1 parent 4ef0e2d commit 3d0da65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules.d/40network/net-lib.sh
Expand Up @@ -178,7 +178,7 @@ set_ifname() {
strstr "$n" "$mac" && echo ${n%%:*} && return
done
# otherwise, pick a new name and use that
while [ -e /sys/class/$name$num ]; do num=$(($num+1)); done
while [ -e /sys/class/net/$name$num ]; do num=$(($num+1)); done
echo "ifname=$name$num:$mac" >> /etc/cmdline.d/45-ifname.conf
echo "$name$num"
}
Expand Down

0 comments on commit 3d0da65

Please sign in to comment.