434 |
fi |
fi |
435 |
|
|
436 |
# setup /etc/resolv.conf |
# setup /etc/resolv.conf |
437 |
|
# whipe out the old one |
438 |
|
echo "# Generated by the magellan-initscripts for ${iface}" > /etc/resolv.conf |
439 |
|
# include head |
440 |
|
if [ -f /etc/resolv.conf.head ] |
441 |
|
then |
442 |
|
cat /etc/resolv.conf.head >> /etc/resolv.conf |
443 |
|
else |
444 |
|
echo "# /etc/resolv.conf.head can replace this line" >> /etc/resolv.conf |
445 |
|
fi |
446 |
|
# add given nameserver |
447 |
if [[ -n ${NAMESERVER} ]] |
if [[ -n ${NAMESERVER} ]] |
448 |
then |
then |
449 |
echo -e ${COLOREDSTAR}"Setting up all nameserver for ${COLBLUE}${iface}${COLDEFAULT} ..." |
echo -e ${COLOREDSTAR}"Setting up all nameserver for ${COLBLUE}${iface}${COLDEFAULT} ..." |
450 |
|
|
|
# whipe out the old one |
|
|
echo "# Generated by the magellan-initscripts for ${iface}" > /etc/resolv.conf |
|
451 |
for dns in ${NAMESERVER} |
for dns in ${NAMESERVER} |
452 |
do |
do |
453 |
echo "nameserver ${dns}" >> /etc/resolv.conf |
echo "nameserver ${dns}" >> /etc/resolv.conf |
455 |
|
|
456 |
unset NAMESERVER |
unset NAMESERVER |
457 |
fi |
fi |
458 |
|
# include tail |
459 |
|
if [ -f /etc/resolv.conf.tail ] |
460 |
|
then |
461 |
|
cat /etc/resolv.conf.tail >> /etc/resolv.conf |
462 |
|
else |
463 |
|
echo "# /etc/resolv.conf.tail can replace this line" >> /etc/resolv.conf |
464 |
|
fi |
465 |
done |
done |
466 |
|
|
467 |
# setup user routes |
# setup user routes |