Magellan Linux

Diff of /trunk/magellan-initscripts/etc/rc.d/init.d/network

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1107 by niro, Wed Jul 14 11:02:11 2010 UTC revision 1108 by niro, Wed Jul 14 14:51:55 2010 UTC
# Line 505  networking_start() Line 505  networking_start()
505   fi   fi
506    
507   # setup /etc/resolv.conf   # 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  
508   # add given nameserver   # add given nameserver
509   if [[ -n ${NAMESERVER} ]]   if [[ -n ${NAMESERVER} ]]
510   then   then
511   echo -e ${COLOREDSTAR}"Setting up all nameserver for ${COLBLUE}${iface}${COLDEFAULT} ..."   echo -e ${COLOREDSTAR}"Setting up all nameserver for ${COLBLUE}${iface}${COLDEFAULT} ..."
512    
513     # whipe out the old one
514     echo "# Generated by the magellan-initscripts for ${iface}" > /etc/resolv.conf
515     # include head
516     if [ -f /etc/resolv.conf.head ]
517     then
518     cat /etc/resolv.conf.head >> /etc/resolv.conf
519     else
520     echo "# /etc/resolv.conf.head can replace this line" >> /etc/resolv.conf
521     fi
522    
523   for dns in ${NAMESERVER}   for dns in ${NAMESERVER}
524   do   do
525   echo "nameserver ${dns}" >> /etc/resolv.conf   echo "nameserver ${dns}" >> /etc/resolv.conf
526   done   done
527    
528     # include tail
529     if [ -f /etc/resolv.conf.tail ]
530     then
531     cat /etc/resolv.conf.tail >> /etc/resolv.conf
532     else
533     echo "# /etc/resolv.conf.tail can replace this line" >> /etc/resolv.conf
534     fi
535    
536   unset NAMESERVER   unset NAMESERVER
537   fi   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  
538   done   done
539    
540   # setup user routes   # setup user routes

Legend:
Removed from v.1107  
changed lines
  Added in v.1108