From owner-svn-src-head@freebsd.org Wed Apr 5 03:55:21 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 DBDB8D2F2E3; Wed, 5 Apr 2017 03:55:21 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 8D8F91C5; Wed, 5 Apr 2017 03:55:21 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id vc2QcwGCtsa1kvc2Rc2vRY; Tue, 04 Apr 2017 21:55:20 -0600 X-Authority-Analysis: v=2.2 cv=W+NIbVek c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=AzvcPWV-tVgA:10 a=XldT38RWNwACPDQzwzUA:9 a=pGLkceISAAAA:8 a=BWvPGDcYAAAA:8 a=6I5d2MoRAAAA:8 a=mmEUiILNrJGAC25O4wsA:9 a=CjuIK1q_8ugA:10 a=HlLvd6S2-EDK2VSQu7AA:9 a=SXhfskFfRtwA:10 a=hquHOILUSkIA:10 a=YxBL1-UpAAAA:8 a=ics_IjAVWSmO8OVX31YA:9 a=BOg4e644cxQA:10 a=6kGIvZw6iX1k4Y-7sg4_:22 a=pxhY87DP9d2VeQe4joPk:22 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 75BA6CD; Tue, 4 Apr 2017 20:55:18 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v353tHDR003124; Tue, 4 Apr 2017 20:55:17 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201704050355.v353tHDR003124@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Ngie Cooper cc: Cy Schubert , =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r316487 - head/etc In-Reply-To: Message from Ngie Cooper of "Tue, 04 Apr 2017 20:18:36 -0700." <58CC0B95-0423-429E-BA73-0F0BD3A2ABBE@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed ; boundary="==_Exmh_1491364344_27640" Date: Tue, 04 Apr 2017 20:55:17 -0700 X-CMAE-Envelope: MS4wfGPNF5vkXOXwO87mRZaMzIhQVZ+rVweoeab06BPXDB3wsILumButdNhGhZ3t8x7MF3ruDRo8jo9eur01tP8Mdd/V/zZrQesuQHN+vhzpqac3hFQSIgbt I72FodWHM0XVsG83Mq/1t+DEZcXoE95pKslX095NN2hzqpLp1V0goei6udH0vqDQPxI07zXzJPrqR0gnHty1tAqfGnnkN5lMxOh+CWrJAy4QjJSVfhh4F3lB /NJZgHHbDrIxNM+Hhgh4AxJwd1OjFlh+KT0AfUMi6UuB3huu8dp1MtQC49Ad2fzsQQ70AAbZj4V+cjzeGlklRg== 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: Wed, 05 Apr 2017 03:55:22 -0000 This is a multipart MIME message. --==_Exmh_1491364344_27640 Content-Type: text/plain; charset=us-ascii In message <58CC0B95-0423-429E-BA73-0F0BD3A2ABBE@gmail.com>, Ngie Cooper writes : > > > > On Apr 4, 2017, at 20:05, Cy Schubert wrote: > > > > In message <201704041143.v34BhVNA046204@repo.freebsd.org>, > > =?UTF-8?Q?Dag-Erling > > _Sm=c3=b8rgrav?= writes: > >> Author: des > >> Date: Tue Apr 4 11:43:31 2017 > >> New Revision: 316487 > >> URL: https://svnweb.freebsd.org/changeset/base/316487 > >> > >> Log: > >> Allow command modifiers (fast, quiet etc.) to be stacked in any order. > >> Add a "debug" modifier that sets rc_debug. > >> > >> MFC after: 3 weeks > >> > >> Modified: > >> head/etc/rc.subr > >> > >> Modified: head/etc/rc.subr > >> ========================================================================== > === > >> = > >> --- head/etc/rc.subr Tue Apr 4 08:17:03 2017 (r316486) > >> +++ head/etc/rc.subr Tue Apr 4 11:43:31 2017 (r316487) > >> @@ -703,10 +703,11 @@ check_startmsgs() > >> # If argument has a given prefix, then change the operation as follows: > >> # Prefix Operation > >> # ------ --------- > >> -# 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 > >> +# 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 > >> # > >> # The following globals are used: > >> # > >> @@ -856,6 +857,8 @@ 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. > >> @@ -863,9 +866,11 @@ check_startmsgs() > >> # > >> # rc_pid PID of command (if appropriate) > >> # > >> -# rc_fast Not empty if "fast" was provided (q.v.) > >> +# rc_fast Not empty if "fast" was provided > >> +# > >> +# rc_force Not empty if "force" was provided > >> # > >> -# rc_force Not empty if "force" was provided (q.v.) > >> +# rc_one Not empty if "one" was provided > >> # > >> # rc_quiet Not empty if "quiet" was provided > >> # > >> @@ -884,34 +889,47 @@ run_rc_command() > >> shift 1 > >> rc_extra_args="$*" > >> > >> - _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 > >> - ;; > >> - one*) # "one" prefix; set ${rcvar}=yes > >> - _rc_prefix=one > >> - rc_arg=${rc_arg#${_rc_prefix}} > >> + : ${rc_debug:=no} ${rc_fast:=no} ${rc_force:=no} ${rc_one:=no} ${rc_q > ui > >> et:=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 > >> 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 > >> + fi > >> + debug "_rc_prefix=${_rc_prefix}" > >> > >> eval _override_command=\$${name}_program > >> command=${_override_command:-$command} > >> > >> > > > > > > Hi des, > > > > This patch caused some boot failures because the contents of rc_force were > > redefined from "yes" (for yes) and NULL (for no) to the words "yes" and > > "no". This in turn caused etc/rc.d/dhclient to assume force when $rc_force > > was not NULL (test -z failed). Interfaces with static IP addresses invoked > > rc.d/dhclient through devd. The attached patch should make all instances > > $rc_force consistent with your change. > > This deserves relnotes (for sure), and it might cause issues in downstream co > nsumers (ports, etc) :/... Here's a much smaller patch. It reverts the defined values of rc_force back to the previous definition, albeit rc_force is no longer consistent with the other rc_* variables. Maybe I should commit this to have statically IPed systems boot again until it can be decided whether rc_force should be made consistent with other rc_* variables or not. --==_Exmh_1491364344_27640 Content-Type: text/plain ; name="r316487-fix.diff"; charset=us-ascii Content-Description: r316487-fix.diff Content-Disposition: attachment; filename="r316487-fix.diff" Index: rc.subr =================================================================== --- rc.subr (revision 316487) +++ rc.subr (working copy) @@ -929,6 +929,9 @@ eval ${rcvar}=YES fi fi + if ! checkyesno rc_force; then + rc_force= + fi debug "_rc_prefix=${_rc_prefix}" eval _override_command=\$${name}_program --==_Exmh_1491364344_27640 Content-Type: text/plain; charset=us-ascii Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. --==_Exmh_1491364344_27640--