[BACK]Return to netstart CVS log [TXT][DIR] Up to [local] / src / etc

Diff for /src/etc/netstart between version 1.207 and 1.208

version 1.207, 2020/11/08 16:51:43 version 1.208, 2020/11/29 20:14:06
Line 177 
Line 177 
 # Usage: defaultroute  # Usage: defaultroute
 defaultroute() {  defaultroute() {
         local _cmd;          local _cmd;
           set -o noglob
   
         ! $V4_DHCPCONF && stripcom /etc/mygate |          stripcom /etc/mygate |
         while read gw; do          while read gw; do
                 [[ $gw == @(*:*) ]] && continue                  case $gw in
                 _cmd="route -qn add -host default $gw"                  '!'*)
                           _cmd=$(print -- "$gw" | sed 's/\$if/'$_if'/g')
                           _cmd="${_cmd#!}"
                           ;;
                   *)
                           if [[ $gw != @(*:*) ]]; then
                                   $V4_DHCPCONF && continue
                                   _cmd="route -qn add -host default $gw"
                           elif [[ $gw == @(*:*) ]]; then
                                   $V6_AUTOCONF && continue
                                   _cmd="route -qn add -host -inet6 default $gw"
                           fi
                           ;;
                   esac
                 if $PRINT_ONLY; then                  if $PRINT_ONLY; then
                         print -r -- "$_cmd" && break                          print -r -- "$_cmd"
                 else                  else
                         $_cmd && break                          $_cmd
                 fi                  fi
         done          done
         ! $V6_AUTOCONF && stripcom /etc/mygate |          set +o noglob
         while read gw; do  
                 [[ $gw == !(*:*) ]] && continue  
                 _cmd="route -qn add -host -inet6 default $gw"  
                 if $PRINT_ONLY; then  
                         print -r -- "$_cmd" && break  
                 else  
                         $_cmd && break  
                 fi  
         done  
 }  }
   
 # Make sure the invoking user has the right privileges.  Check for presence of  # Make sure the invoking user has the right privileges.  Check for presence of
Line 240 
Line 245 
 fi  fi
   
 # Otherwise, process with the complete network initialization.  # Otherwise, process with the complete network initialization.
   
 # /etc/myname contains my symbolic name.  
 [[ -f /etc/myname ]] && hostname "$(stripcom /etc/myname)"  
   
 # Set the address for the loopback interface.  Bringing the interface up,  # Set the address for the loopback interface.  Bringing the interface up,
 # automatically invokes the IPv6 address ::1.  # automatically invokes the IPv6 address ::1.

Legend:
Removed from v.1.207  
changed lines
  Added in v.1.208