--- trunk/magellan-initscripts/etc/rc.d/init.d/network 2010/07/06 13:46:34 1089 +++ trunk/magellan-initscripts/etc/rc.d/init.d/network 2010/07/14 07:25:22 1090 @@ -434,12 +434,20 @@ 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 + for dns in ${NAMESERVER} do echo "nameserver ${dns}" >> /etc/resolv.conf @@ -447,6 +455,13 @@ 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