From owner-svn-src-head@freebsd.org Thu Apr 6 12:52:06 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DEE7DD30F88; Thu, 6 Apr 2017 12:52:06 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B3698FF6; Thu, 6 Apr 2017 12:52:06 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v36Cq5c0057522; Thu, 6 Apr 2017 12:52:05 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v36Cq5Nn057521; Thu, 6 Apr 2017 12:52:05 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201704061252.v36Cq5Nn057521@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 6 Apr 2017 12:52:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316567 - head/etc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Apr 2017 12:52:07 -0000 Author: cy Date: Thu Apr 6 12:52:05 2017 New Revision: 316567 URL: https://svnweb.freebsd.org/changeset/base/316567 Log: Revert r316487. It is broken, causing boot to fail due to line 25 in etc/rc.d/dhclient unconditionally testing true when called by a devd rule during boot, ignoring statically assigned IP addresses in rc.conf. Requested by: des@ Modified: head/etc/rc.subr Modified: head/etc/rc.subr ============================================================================== --- head/etc/rc.subr Thu Apr 6 12:44:34 2017 (r316566) +++ head/etc/rc.subr Thu Apr 6 12:52:05 2017 (r316567) @@ -703,11 +703,10 @@ check_startmsgs() # If argument has a given prefix, then change the operation as follows: # Prefix Operation # ------ --------- -# debug Enable debugging messages and set rc_debug to yes -# fast Skip the pid check and set rc_fast and rc_quiet to yes -# force Skip sanity checks and set ${rcvar} and rc_force to yes -# one Set ${rcvar} and set rc_one to yes -# quiet Don't output some diagnostics, and set rc_quiet to yes +# fast Skip the pid check, and set rc_fast=yes, rc_quiet=yes +# force Set ${rcvar} to YES, and set rc_force=yes +# one Set ${rcvar} to YES +# quiet Don't output some diagnostics, and set rc_quiet=yes # # The following globals are used: # @@ -857,8 +856,6 @@ check_startmsgs() # rc_arg Argument to command, after fast/force/one processing # performed # -# rc_debug True if "debug" was provided -# # rc_flags Flags to start the default command with. # Defaults to ${name}_flags, unless overridden # by $flags from the environment. @@ -866,11 +863,9 @@ check_startmsgs() # # rc_pid PID of command (if appropriate) # -# rc_fast Not empty if "fast" was provided -# -# rc_force Not empty if "force" was provided +# rc_fast Not empty if "fast" was provided (q.v.) # -# rc_one Not empty if "one" was provided +# rc_force Not empty if "force" was provided (q.v.) # # rc_quiet Not empty if "quiet" was provided # @@ -889,47 +884,34 @@ run_rc_command() shift 1 rc_extra_args="$*" - : ${rc_debug:=no} ${rc_fast:=no} ${rc_force:=no} ${rc_one:=no} ${rc_quiet:=no} - while :; do - case "$rc_arg" in - debug*) # "debug" prefix; enable debugging - rc_debug=yes - rc_quiet=no - rc_arg=${rc_arg#debug} - _rc_prefix="${_rc_prefix}debug" - ;; - fast*) # "fast" prefix; don't check pid - rc_fast=yes - rc_quiet=yes - rc_arg=${rc_arg#fast} - _rc_prefix="${_rc_prefix}fast" - ;; - force*) # "force" prefix; always run - rc_force=yes - rc_arg=${rc_arg#force} - _rc_prefix="${_rc_prefix}force" - ;; - one*) # "one" prefix; set ${rcvar}=yes - rc_one=yes - rc_arg=${rc_arg#one} - _rc_prefix="${_rc_prefix}one" - ;; - quiet*) # "quiet" prefix; omit some messages - rc_quiet=yes - rc_arg=${rc_arg#quiet} - _rc_prefix="${_rc_prefix}quiet" - ;; - *) - break - ;; - esac - done - if checkyesno rc_force || checkyesno rc_one ; then + _rc_prefix= + case "$rc_arg" in + fast*) # "fast" prefix; don't check pid + rc_arg=${rc_arg#fast} + rc_fast=yes + rc_quiet=yes + ;; + force*) # "force" prefix; always run + rc_force=yes + _rc_prefix=force + rc_arg=${rc_arg#${_rc_prefix}} if [ -n "${rcvar}" ]; then eval ${rcvar}=YES fi - fi - debug "_rc_prefix=${_rc_prefix}" + ;; + one*) # "one" prefix; set ${rcvar}=yes + _rc_prefix=one + rc_arg=${rc_arg#${_rc_prefix}} + if [ -n "${rcvar}" ]; then + eval ${rcvar}=YES + fi + ;; + quiet*) # "quiet" prefix; omit some messages + _rc_prefix=quiet + rc_arg=${rc_arg#${_rc_prefix}} + rc_quiet=yes + ;; + esac eval _override_command=\$${name}_program command=${_override_command:-$command}