[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.3.2.1 and 1.4

version 1.3.2.1, 2018/07/27 10:43:18 version 1.4, 2015/10/16 18:06:22
Line 1 
Line 1 
 #!/bin/sh  #!/bin/sh
   
 # $NetBSD$  
   
 # PROVIDE: dhcpcd  # PROVIDE: dhcpcd
 # REQUIRE: network mountcritlocal  # REQUIRE: network mountcritlocal
 # BEFORE:  NETWORKING  # BEFORE:  NETWORKING
Line 15  extra_commands="reload"
Line 13  extra_commands="reload"
   
 load_rc_config $name  load_rc_config $name
   
 # Work out what pidfile dhcpcd will use based on flags  # If the last argument to dhcpcd is a valid interface and the prior argument
   # 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
 pidfile=$(eval $command -P $myflags 2>/dev/null)  ifname="${myflags##* }"
 : ${pidfile:=/var/run/$name.pid}  myflags="${myflags%% $ifname}"
 unset myflags  last_flag="${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.3.2.1  
changed lines
  Added in v.1.4

CVSweb <webmaster@jp.NetBSD.org>