1 |
# $Header: /home/cvsd/alx-cvs/alx-src/tinyalxconfig-ng/functions/config_network.sh,v 1.5 2008-06-04 18:37:17 niro Exp $ |
# $Header: /home/cvsd/alx-cvs/alx-src/tinyalxconfig-ng/functions/config_network.sh,v 1.6 2008-06-04 20:37:50 niro Exp $ |
2 |
# configures networkin on the host via mysql db settings |
# configures networkin on the host via mysql db settings |
3 |
|
|
4 |
get_network_settings() |
get_network_settings() |
90 |
|
|
91 |
# remove all old nics and modules configs |
# remove all old nics and modules configs |
92 |
find /etc/conf.d -type f -name 'net.*' | xargs rm |
find /etc/conf.d -type f -name 'net.*' | xargs rm |
|
find /etc/modules.d -type f -name 'net.*' | xargs rm |
|
|
|
|
|
# update the preliminary network |
|
|
# set an device alias for modprobe.conf |
|
|
[ ! -d /etc/modules.d ] && install -d /etc/modules.d |
|
|
# update only if not the same (to speed up bootprocess - no depmod) |
|
|
if [ ! -f /etc/modules.d/net.${iface} ] || |
|
|
[[ ${iface} != $(cat /etc/modules.d/net.${iface} | cut -d' ' -f2) ]] |
|
|
then |
|
|
echo "alias ${iface} ${ALX_MODULE}" > /etc/modules.d/net.${iface} |
|
|
fi |
|
93 |
|
|
94 |
# update confd-networking default iface |
# update confd-networking default iface |
95 |
[ ! -d ${SETTINGSPATH} ] && install -d ${SETTINGSPATH} |
[ ! -d ${SETTINGSPATH} ] && install -d ${SETTINGSPATH} |