Magellan Linux

Diff of /alx-src/trunk/tinyalxconfig-ng/init.d/alxsettings

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

revision 387 by niro, Wed Jun 4 16:52:25 2008 UTC revision 388 by niro, Wed Jun 4 16:54:35 2008 UTC
# Line 11  Line 11 
11  #%before:  #%before:
12  #%after:  #%after:
13    
14  # $Header: /home/cvsd/alx-cvs/alx-src/tinyalxconfig-ng/init.d/alxsettings,v 1.2 2008-06-04 16:52:25 niro Exp $  # $Header: /home/cvsd/alx-cvs/alx-src/tinyalxconfig-ng/init.d/alxsettings,v 1.3 2008-06-04 16:54:35 niro Exp $
15    
16  # checks first if the client was already configured and if it has an valid serial  # checks first if the client was already configured and if it has an valid serial
17  # if not it runs the autoconfiguration script  # if not it runs the autoconfiguration script
# Line 647  preliminary_network() Line 647  preliminary_network()
647   case $1 in   case $1 in
648   start)   start)
649   # keeping like always safe:   # keeping like always safe:
650   # no network should be startet here,   # no network should be started here
651   # so we can delete all pid files if one exists   ${rc_base}/init.d/network stop
  if ps -A|grep dhcpcd > /dev/null  
  then  
  echo -e ${COLMAGENTA}"Forcing network down"${COLDEFAULT}  
  dhcpcd -k  
  sleep 1  
  else  
  rm -f /var/run/dhcpcd-eth?.pid  
  fi  
  [[ ${ALX_CONFD_NETWORKING} = true ]] && [[ ${RUNLEVEL} != S ]] && \  
  ${rc_base}/init.d/network stop  
652    
653   echo -e ${COLMAGENTA}"Starting preliminary networking ... "${COLDEFAULT}   echo -e ${COLMAGENTA}"Starting preliminary networking ... "${COLDEFAULT}
   
654   # start network configured from /etc/conf.d   # start network configured from /etc/conf.d
655   if [[ ${ALX_CONFD_NETWORKING} = true ]]   ${rc_base}/init.d/network start
  then  
  ${rc_base}/init.d/network start  
  else  
  echo -e ${COLOREDSTAR}"Starting default dhcp based networking ... "${COLDEFAULT}  
  # -t 10 timeout of 10 secs  
  dhcpcd -t 10 &> /dev/null  
  evaluate_retval  
  fi  
656   ;;   ;;
657    
658   stop)   stop)
659   echo -e ${COLMAGENTA}"Stopping preliminary networking ... "${COLDEFAULT}   echo -e ${COLMAGENTA}"Stopping preliminary networking ... "${COLDEFAULT}
660   if [[ ${ALX_CONFD_NETWORKING} = true ]]   ${rc_base}/init.d/network stop
  then  
  ${rc_base}/init.d/network stop  
  else  
  echo -e ${COLOREDSTAR}"Stopping default dhcp based networking ... "${COLDEFAULT}  
  ifconfig eth0 down  
  fi  
  if ps -A|grep dhcpcd > /dev/null  
  then  
  dhcpcd -z  &> /dev/null  
  fi  
  evaluate_retval  
661   ;;   ;;
662    
663   *)   *)

Legend:
Removed from v.387  
changed lines
  Added in v.388