[BACK]Return to downinterfaces CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / etc / rc.d

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/etc/rc.d/downinterfaces between version 1.3 and 1.6

version 1.3, 2002/04/18 07:33:42 version 1.6, 2009/09/05 16:26:07
Line 4 
Line 4 
 #  #
   
 # PROVIDE: downinterfaces  # PROVIDE: downinterfaces
 # KEYWORD: shutdown  # KEYWORD: nostart shutdown
   
 if [ "x$1" != "xstop" ]; then exit 0; fi  $_rc_subr_loaded . /etc/rc.subr
   
 . /etc/rc.conf  name="downinterfaces"
   start_cmd=":"
   stop_cmd="downinterfaces_stop"
   
 tmp=`ifconfig -lu`  downinterfaces_stop()
 iflist=""  {
 for int in $tmp; do          tmp=$(ifconfig -lu)
         case $int in          iflist=""
         pppoe*) iflist="$iflist $int"          for int in $tmp; do
                 ;;                  case $int in
         esac                  pppoe*) iflist="$iflist $int"
 done                          ;;
 iflist="$iflist $force_down_interfaces"                  esac
 if [ "$iflist" = "" ] || [ "$iflist" = " " ]; then exit 0; fi          done
           iflist="$iflist $force_down_interfaces"
 echo "Shutting down interfaces:$iflist"          if [ "$iflist" != "" ] && [ "$iflist" != " " ]
 for int in $iflist; do          then
         ifconfig $int down  
 done                  echo "Shutting down interfaces:$iflist"
                   for int in $iflist; do
                           ifconfig $int down
                   done
           fi
   }
   
   load_rc_config $name
   run_rc_command "$1"

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.6

CVSweb <webmaster@jp.NetBSD.org>