View | Details | Raw Unified | Return to bug 8656
Collapse All | Expand All

(-)ethtool.old (-2 / +35 lines)
Lines 11-19 Link Here
11
LOCKFILE=/var/lock/subsys/ethtool
11
LOCKFILE=/var/lock/subsys/ethtool
12
ETHTOOL=/usr/sbin/ethtool
12
ETHTOOL=/usr/sbin/ethtool
13
ETHCFG=/etc/sysconfig/ethtool
13
ETHCFG=/etc/sysconfig/ethtool
14
IFCFG=/etc/sysconfig/network-scripts/ifcfg
15
PARAMS="speed duplex port autoneg phyad xcvr wol sopass msglvl"
14
PARAMS="speed duplex port autoneg phyad xcvr wol sopass msglvl"
16
15
16
SourceIfNotEmpty /etc/sysconfig/network
17
	
18
if [ "$CONFMETHOD" == "etcnet" ]; then
19
    IFCFG=/etc/net/ifaces
20
else
21
    IFCFG=/etc/sysconfig/network-scripts/ifcfg
22
fi
23
24
17
[ -x $ETHTOOL ] || exit 0
25
[ -x $ETHTOOL ] || exit 0
18
26
19
# if /etc/sysconfig/ethtool exists and contains non-zero ETH value, it is
27
# if /etc/sysconfig/ethtool exists and contains non-zero ETH value, it is
Lines 23-29 Link Here
23
31
24
SourceIfNotEmpty $ETHCFG && [ -n "$ETH" ] || exit 0
32
SourceIfNotEmpty $ETHCFG && [ -n "$ETH" ] || exit 0
25
33
26
get_interfaces () {
34
get_interfaces_netscripts () {
27
	unset INTERFACES
35
	unset INTERFACES
28
	[ "$ETH" = all ] && {
36
	[ "$ETH" = all ] && {
29
		INTERFACES=`ls $IFCFG-eth* \
37
		INTERFACES=`ls $IFCFG-eth* \
Lines 38-43 Link Here
38
	echo $INTERFACES
46
	echo $INTERFACES
39
}
47
}
40
48
49
get_interfaces_etcnet () {
50
	unset INTERFACES
51
	[ "$ETH" = all ] && {
52
		INTERFACES=`ls -d $IFCFG/eth* \
53
		| egrep 'eth[0-9]+$' \
54
		| sed 's,^.*/\(eth.*\),\1,'`
55
	} || {
56
		for i in $ETH; do
57
			[ -d $IFCFG/$i ] && INTERFACES="$INTERFACES $i";
58
		done
59
	}
60
	[ -z "$INTERFACES" ] && exit 0
61
	echo $INTERFACES
62
}
63
64
get_interfaces () {
65
	SourceIfNotEmpty /etc/sysconfig/network
66
	
67
	if [ "$CONFMETHOD" == "etcnet" ]; then
68
	    echo `get_interfaces_etcnet`
69
	else
70
	    echo `get_interfaces_netscripts`
71
	fi
72
}
73
41
tune_interface () {
74
tune_interface () {
42
	# collect parameters from ground up; use them
75
	# collect parameters from ground up; use them
43
	unset $PARAMS ARGS
76
	unset $PARAMS ARGS

Return to bug 8656