--- trunk/magellan-initscripts/etc/rc.d/init.d/network 2010/07/14 11:02:11 1092 +++ trunk/magellan-initscripts/etc/rc.d/init.d/network 2010/07/14 14:51:55 1108 @@ -505,34 +505,36 @@ fi # setup /etc/resolv.conf - # whipe out the old one - echo "# Generated by the magellan-initscripts for ${iface}" > /etc/resolv.conf - # include head - if [ -f /etc/resolv.conf.head ] - then - cat /etc/resolv.conf.head >> /etc/resolv.conf - else - echo "# /etc/resolv.conf.head can replace this line" >> /etc/resolv.conf - fi # add given nameserver if [[ -n ${NAMESERVER} ]] then echo -e ${COLOREDSTAR}"Setting up all nameserver for ${COLBLUE}${iface}${COLDEFAULT} ..." + # whipe out the old one + echo "# Generated by the magellan-initscripts for ${iface}" > /etc/resolv.conf + # include head + if [ -f /etc/resolv.conf.head ] + then + cat /etc/resolv.conf.head >> /etc/resolv.conf + else + echo "# /etc/resolv.conf.head can replace this line" >> /etc/resolv.conf + fi + for dns in ${NAMESERVER} do echo "nameserver ${dns}" >> /etc/resolv.conf done + # include tail + if [ -f /etc/resolv.conf.tail ] + then + cat /etc/resolv.conf.tail >> /etc/resolv.conf + else + echo "# /etc/resolv.conf.tail can replace this line" >> /etc/resolv.conf + fi + unset NAMESERVER fi - # include tail - if [ -f /etc/resolv.conf.tail ] - then - cat /etc/resolv.conf.tail >> /etc/resolv.conf - else - echo "# /etc/resolv.conf.tail can replace this line" >> /etc/resolv.conf - fi done # setup user routes