75 |
|
|
76 |
# remove all old nics and modules configs |
# remove all old nics and modules configs |
77 |
find /etc/conf.d -type f -name 'net.*' | xargs rm |
find /etc/conf.d -type f -name 'net.*' | xargs rm |
78 |
find /etc/modules.d -type f -name 'net.*' | xargs rm |
find /etc/modprobe.d -type f -name 'net.*' | xargs rm |
79 |
|
|
80 |
# update the preliminary network |
# update the preliminary network |
81 |
# set an device alias for modprobe.conf |
# set an device alias for modprobe.conf |
82 |
[ ! -d /etc/modules.d ] && install -d /etc/modules.d |
[ ! -d /etc/modprobe.d ] && install -d /etc/modprobe.d |
83 |
# update only if not the same (to speed up bootprocess - no depmod) |
# update only if not the same (to speed up bootprocess - no depmod) |
84 |
if [ ! -f /etc/modules.d/net.${iface} ] || |
if [ ! -f /etc/modprobe.d/net.${iface}.conf ] || |
85 |
[[ ${iface} != $(cat /etc/modules.d/net.${iface} | cut -d' ' -f2) ]] |
[[ ${iface} != $(cat /etc/modprobe.d/net.${iface}.conf | cut -d' ' -f2) ]] |
86 |
then |
then |
87 |
CONFIG=/etc/modules.d/net.${iface} |
CONFIG=/etc/modprobe.d/net.${iface}.conf |
88 |
clearconfig |
clearconfig |
89 |
addconfig "alias ${iface} ${ALX_MODULE}" |
addconfig "alias ${iface} ${ALX_MODULE}" |
90 |
fi |
fi |