Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-stable
Commits
7dacaea1
Commit
7dacaea1
authored
Nov 14, 2008
by
Ryan Jackson
Browse files
This fix is cleaner than the last one. Just make sure the ifconfig
output contains 'encap:Ethernet'.
parent
f54359c5
Changes
2
Hide whitespace changes
Inline
Side-by-side
tmcd/fedora/ifcfg-eth99
View file @
7dacaea1
...
...
@@ -27,19 +27,7 @@ IFACETYPES="3c59x e100 e1000 tulip e1000e tg3"
#
modprobe -qa $IFACETYPES
interfaces=''
if [ -d /sys/class/net ]; then
for d in /sys/class/net/*; do
[ -f $d/type ] || continue
# Type 1 is Ethernet. dhclient only supports
# type 1.
if [ `cat $d/type` = 1 ]; then
interfaces="$interfaces ${d##*/}"
fi
done
else
interfaces=`ifconfig -a -s | sed '1d;/^lo /d;/^wmaster/d;s/ .*$//'`
fi
interfaces=`ifconfig -a | sed -n 's/^\([^ ]*\).*encap:Ethernet.*$/\1/p'`
#
# Check: are we a remote node? If so, possibly try static config in pref
...
...
tmcd/linux/ifcfg-eth99
View file @
7dacaea1
...
...
@@ -26,19 +26,7 @@ IFACETYPES="3c59x eepro100 e1000 r8169 tulip"
#
modprobe -qa $IFACETYPES
interfaces=''
if [ -d /sys/class/net ]; then
for d in /sys/class/net/*; do
[ -f $d/type ] || continue
# Type 1 is Ethernet. dhclient only supports
# type 1.
if [ `cat $d/type` = 1 ]; then
interfaces="$interfaces ${d##*/}"
fi
done
else
interfaces=`ifconfig -a -s | sed '1d;/^lo /d;/^wmaster/d;s/ .*$//'`
fi
interfaces=`ifconfig -a | sed -n 's/^\([^ ]*\).*encap:Ethernet.*$/\1/p'`
#
# If dhclient returns success, then it has configured the first interface
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment