[BACK]Return to dhcpcd 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/dhcpcd between version 1.4 and 1.5

version 1.4, 2015/10/16 18:06:22 version 1.5, 2016/01/07 22:03:00
Line 1 
Line 1 
 #!/bin/sh  #!/bin/sh
   
   # $NetBSD$
   
 # PROVIDE: dhcpcd  # PROVIDE: dhcpcd
 # REQUIRE: network mountcritlocal  # REQUIRE: network mountcritlocal
 # BEFORE:  NETWORKING  # BEFORE:  NETWORKING
Line 13  extra_commands="reload"
Line 15  extra_commands="reload"
   
 load_rc_config $name  load_rc_config $name
   
 # If the last argument to dhcpcd is a valid interface and the prior argument  # Work out what pidfile dhcpcd will use based on flags
 # is not then dhcpcd will start on one interface only and create a pidfile  
 # based on the interface name. See PR bin/43490.  
 if [ -n "$flags" ]; then  if [ -n "$flags" ]; then
         myflags=$flags          myflags=$flags
 else  else
         eval myflags=\$${name}_flags          eval myflags=\$${name}_flags
 fi  fi
 ifname="${myflags##* }"  pidfile=$(eval $command -P $myflags 2>/dev/null)
 myflags="${myflags%% $ifname}"  : ${pidfile:=/var/run/$name.pid}
 last_flag="${myflags##* }"  unset myflags
 # Address the problem of having just dhcpcd_flags=wm0  
 if [ "$myflags" = "$last_flag" ]; then  
         last_flag="invalidinterfacename"  
 fi  
 if /sbin/ifconfig "$ifname" >/dev/null 2>&1 &&  
     ! /sbin/ifconfig "$last_flag" >/dev/null 2>&1  
 then  
         pidfile=/var/run/$name-"$ifname".pid  
 else  
         pidfile=/var/run/$name.pid  
 fi  
 unset myflags ifname last_flag  
   
 run_rc_command "$1"  run_rc_command "$1"

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

CVSweb <webmaster@jp.NetBSD.org>