|
Lines 80-85
Link Here
|
| 80 |
echo ${octet[1]}.${octet[2]}.${octet[3]}.${octet[4]} |
80 |
echo ${octet[1]}.${octet[2]}.${octet[3]}.${octet[4]} |
| 81 |
} |
81 |
} |
| 82 |
|
82 |
|
|
|
83 |
# this checks whether we have an isa network card the module of which should be loaded! |
| 84 |
check_isacards() { |
| 85 |
for i in ifcfg*; do |
| 86 |
# find out whether we have an isa-type network card ... |
| 87 |
ISACARD=`awk -F = '{\ |
| 88 |
if($1=="_nm_name"){\ |
| 89 |
if(match($2, "isa")){\ |
| 90 |
gsub(/\047/, "", $2);\ |
| 91 |
printf("hwcfg-%s", $2)\ |
| 92 |
}\ |
| 93 |
}\ |
| 94 |
}' $i` |
| 95 |
# ok. ISACARD contains the name of a hardware-entry now. |
| 96 |
# find out the name of the corresponding module! |
| 97 |
# comment: to replace "'" in awk, I use octal writing \047. |
| 98 |
# let me know if you have a better idea! |
| 99 |
if [ "" != "${ISACARD}" ]; then |
| 100 |
ISAMODULE=`awk -F = '{\ |
| 101 |
if($1=="MODULE"){\ |
| 102 |
gsub(/\047/, "", $2);\ |
| 103 |
printf("%s", $2)\ |
| 104 |
}\ |
| 105 |
}' ../hardware/${ISACARD}` |
| 106 |
if [ "" != "${ISAMODULE}" ]; then |
| 107 |
LOADED=`lsmod | awk -v ISAMODULE="${ISAMODULE}" '{if($1==ISAMODULE){printf("%s", $1)}}'` |
| 108 |
else |
| 109 |
LOADED="NO_MODULE_TO_LOAD" |
| 110 |
fi |
| 111 |
if [ "" = "${LOADED}" ]; then |
| 112 |
echo -n "Loading ${ISAMODULE} - module (Network) " |
| 113 |
modprobe ${ISAMODULE} > /dev/null 2>&1 |
| 114 |
echo "$rc_done" |
| 115 |
fi |
| 116 |
fi |
| 117 |
done |
| 118 |
} |
| 119 |
|
| 83 |
is_iface_available () { |
120 |
is_iface_available () { |
| 84 |
test -z "$1" && return 1 |
121 |
test -z "$1" && return 1 |
| 85 |
case $1 in |
122 |
case $1 in |