From owner-svn-src-head@freebsd.org Wed Apr 5 03:18:42 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 08249D2E887; Wed, 5 Apr 2017 03:18:42 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x235.google.com (mail-pg0-x235.google.com [IPv6:2607:f8b0:400e:c05::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CC6D91FCC; Wed, 5 Apr 2017 03:18:41 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x235.google.com with SMTP id 21so729792pgg.1; Tue, 04 Apr 2017 20:18:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=vdgGewFz1FGm9N9oBa83h6aTLd9l23UddtqeECcaS50=; b=s38o4HdhpnjkZ4qQTftmF86lCw0Eui3M1L+3flcz7YL1YtSpCzF9XyGOknHR3Pz9Ms 8IMGySdutkw57UPTh+SBAWRSyMDuI4l9Ko2JFf8lEIjJni5pr0gneMZGaO2bwtucByxT 0PoliH3dh2z/2HLwMoN7BpcTZ/S0sxQHlbp27Mq3V2nZLbh66qjVhnn9UKKvBIVTuTuz ygxmWdYEoyT9YEnNeYQMX0IET/eQDmHLUX39yKv8Z5fezw7z//f3o0kcbF4zbXJzU8gG lsLepb0OTvnCCpumkq6TrRTepsGjLkvxCZWDkKxyh22Ud3pggieuczHIn4cZF1Ulf7S+ Ov3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=vdgGewFz1FGm9N9oBa83h6aTLd9l23UddtqeECcaS50=; b=Uf1ve0XySuxrjQqUwaeBexpS5oyPpTSsNeA/1JUWGELJKgdsovJdQiazfk6GE7hVNp dkOtiDHf5Z0/hweah5XfygJRcpAZYM3Nn045DE3hzmHghCNiSZTS0oR5ozNSCUrkbtdh Ua+5JpIibiuEMpe38zmbl4gGb+M3gTlO5OELad7oxcVDKzfDtPBbPSRG7M5m6r4Oq8HN 1O4VVbkWiPTrZCWdsof13SGkwGYHRjUs7rHkLp/ATC4RwesaRN7HWE01X0bNB5pSDqcC dBklMRm+WVTI7s443/HnTH0IuMsjYjjOuT5Ue4gDJI35JnSyr8npaIc2FkDRTm/fS3To RCfw== X-Gm-Message-State: AFeK/H3XAp8+GFtTBl4Yt4CTlEKZbwu6nmq4npu8Wz3PFjqR9y+N1i7Ej7HoSYH9N7hUow== X-Received: by 10.98.210.133 with SMTP id c127mr27434877pfg.83.1491362321081; Tue, 04 Apr 2017 20:18:41 -0700 (PDT) Received: from [192.168.50.133] (50-251-209-113-static.hfc.comcastbusiness.net. [50.251.209.113]) by smtp.gmail.com with ESMTPSA id e5sm34113303pga.13.2017.04.04.20.18.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Apr 2017 20:18:40 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r316487 - head/etc From: Ngie Cooper X-Mailer: iPhone Mail (14E277) In-Reply-To: <201704050305.v3535VE2006000@slippy.cwsent.com> Date: Tue, 4 Apr 2017 20:18:36 -0700 Cc: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <58CC0B95-0423-429E-BA73-0F0BD3A2ABBE@gmail.com> References: <201704050305.v3535VE2006000@slippy.cwsent.com> To: Cy Schubert 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:18:42 -0000 > On Apr 4, 2017, at 20:05, Cy Schubert wrote: >=20 > In message <201704041143.v34BhVNA046204@repo.freebsd.org>,=20 > =3D?UTF-8?Q?Dag-Erling > _Sm=3Dc3=3Db8rgrav?=3D writes: >> Author: des >> Date: Tue Apr 4 11:43:31 2017 >> New Revision: 316487 >> URL: https://svnweb.freebsd.org/changeset/base/316487 >>=20 >> Log: >> Allow command modifiers (fast, quiet etc.) to be stacked in any order. >> Add a "debug" modifier that sets rc_debug. >>=20 >> MFC after: 3 weeks >>=20 >> Modified: >> head/etc/rc.subr >>=20 >> Modified: head/etc/rc.subr >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= >> =3D >> --- 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=3Dyes, rc_quiet=3Dy= es >> -# force Set ${rcvar} to YES, and set rc_force=3Dyes >> -# one Set ${rcvar} to YES >> -# quiet Don't output some diagnostics, and set rc_quiet=3Dyes >> +# 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 ye= s >> +# 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=3D"$*" >>=20 >> - _rc_prefix=3D >> - case "$rc_arg" in >> - fast*) # "fast" prefix; don't check pid >> - rc_arg=3D${rc_arg#fast} >> - rc_fast=3Dyes >> - rc_quiet=3Dyes >> - ;; >> - force*) # "force" prefix; always run >> - rc_force=3Dyes >> - _rc_prefix=3Dforce >> - rc_arg=3D${rc_arg#${_rc_prefix}} >> - if [ -n "${rcvar}" ]; then >> - eval ${rcvar}=3DYES >> - fi >> - ;; >> - one*) # "one" prefix; set ${rcvar}=3Dyes >> - _rc_prefix=3Done >> - rc_arg=3D${rc_arg#${_rc_prefix}} >> + : ${rc_debug:=3Dno} ${rc_fast:=3Dno} ${rc_force:=3Dno} ${rc_one:=3Dn= o} ${rc_qui >> et:=3Dno} >> + while :; do >> + case "$rc_arg" in >> + debug*) # "debug" prefix; enable debugging >> + rc_debug=3Dyes >> + rc_quiet=3Dno >> + rc_arg=3D${rc_arg#debug} >> + _rc_prefix=3D"${_rc_prefix}debug" >> + ;; >> + fast*) # "fast" prefix; don't check pid >> + rc_fast=3Dyes >> + rc_quiet=3Dyes >> + rc_arg=3D${rc_arg#fast} >> + _rc_prefix=3D"${_rc_prefix}fast" >> + ;; >> + force*) # "force" prefix; always run >> + rc_force=3Dyes >> + rc_arg=3D${rc_arg#force} >> + _rc_prefix=3D"${_rc_prefix}force" >> + ;; >> + one*) # "one" prefix; set ${rcvar}=3Dyes >> + rc_one=3Dyes >> + rc_arg=3D${rc_arg#one} >> + _rc_prefix=3D"${_rc_prefix}one" >> + ;; >> + quiet*) # "quiet" prefix; omit some messages >> + rc_quiet=3Dyes >> + rc_arg=3D${rc_arg#quiet} >> + _rc_prefix=3D"${_rc_prefix}quiet" >> + ;; >> + *) >> + break >> + ;; >> + esac >> + done >> + if checkyesno rc_force || checkyesno rc_one ; then >> if [ -n "${rcvar}" ]; then >> eval ${rcvar}=3DYES >> fi >> - ;; >> - quiet*) # "quiet" prefix; omit some messages >> - _rc_prefix=3Dquiet >> - rc_arg=3D${rc_arg#${_rc_prefix}} >> - rc_quiet=3Dyes >> - ;; >> - esac >> + fi >> + debug "_rc_prefix=3D${_rc_prefix}" >>=20 >> eval _override_command=3D\$${name}_program >> command=3D${_override_command:-$command} >>=20 >>=20 >=20 >=20 > Hi des, >=20 > This patch caused some boot failures because the contents of rc_force were= =20 > redefined from "yes" (for yes) and NULL (for no) to the words "yes" and=20= > "no". This in turn caused etc/rc.d/dhclient to assume force when $rc_force= =20 > was not NULL (test -z failed). Interfaces with static IP addresses invoked= =20 > rc.d/dhclient through devd. The attached patch should make all instances=20= > $rc_force consistent with your change. This deserves relnotes (for sure), and it might cause issues in downstream c= onsumers (ports, etc) :/... -Ngie=