From owner-svn-src-head@freebsd.org Mon Feb 12 10:58:46 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93901F0E64E; Mon, 12 Feb 2018 10:58:46 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.blih.net", Issuer "mail.blih.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id C9A4F6DB33; Mon, 12 Feb 2018 10:58:45 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) by mail.blih.net (OpenSMTPD) with ESMTP id 078a8f5d; Mon, 12 Feb 2018 11:52:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=mail; bh=ahNPyDHzukbxob12cmDqWvNak/8=; b=k5dXb3WoAHP+cNnH/biRYloK9eCK iSby3ba8ifAal6A2RbvFUw9gzSGkN7R6Auek4xj0i5QaY7+Ze4DDfCaJDAWHwOYX tdibU6KVLcT5yDXP/Nyli9tSzS2LUFZByBQTPHsS0IYd43I8t6OdUriZQ4HbjPmY FPBr1s73l1/67lI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; q=dns; s= mail; b=cQ5AbBYvTM1xxWTDqsyAW8xrxGlXcJy37M9eKzGgMV3JCMV4kTf7h55T 7inY1SEPfZMyi1LZ8U0PdLlcHHLw8AS2d6+EHLSVvplsUbMb+dSgIRulI+PeNbn8 scZYlgv0WuSIS7KjUz+c7zYi0k9YlC6TCAdFUCkPhRamk/NFXXk= Received: from arcadia (evadot.gandi.net [217.70.181.36]) by mail.blih.net (OpenSMTPD) with ESMTPSA id a7cff899 TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Mon, 12 Feb 2018 11:52:03 +0100 (CET) Date: Mon, 12 Feb 2018 11:52:02 +0100 From: Emmanuel Vadot To: Brad Davis Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r328136 - in head/etc: defaults rc.d Message-Id: <20180212115202.414ce229077525da98716595@bidouilliste.com> In-Reply-To: <201801182045.w0IKjf44088801@repo.freebsd.org> References: <201801182045.w0IKjf44088801@repo.freebsd.org> X-Mailer: Sylpheed 3.6.0 (GTK+ 2.24.31; amd64-portbld-freebsd12.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 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: Mon, 12 Feb 2018 10:58:46 -0000 On Thu, 18 Jan 2018 20:45:41 +0000 (UTC) Brad Davis wrote: > Author: brd (doc,ports committer) > Date: Thu Jan 18 20:45:41 2018 > New Revision: 328136 > URL: https://svnweb.freebsd.org/changeset/base/328136 > > Log: > Teach the resolv startup script to respect its enable flag. > > Reviewed by: will, imp > Approved by: imp > > Modified: > head/etc/defaults/rc.conf > head/etc/rc.d/resolv > > Modified: head/etc/defaults/rc.conf > ============================================================================== > --- head/etc/defaults/rc.conf Thu Jan 18 20:12:12 2018 (r328135) > +++ head/etc/defaults/rc.conf Thu Jan 18 20:45:41 2018 (r328136) > @@ -96,6 +96,7 @@ fsck_y_enable="NO" # Set to YES to do fsck -y if the i > fsck_y_flags="-T ffs:-R -T ufs:-R" # Additional flags for fsck -y > background_fsck="YES" # Attempt to run fsck in the background where possible. > background_fsck_delay="60" # Time to wait (seconds) before starting the fsck. > +growfs_enable="NO" # Set to YES to attempt to grow the root filesystem on boot > netfs_types="nfs:NFS smbfs:SMB" # Net filesystems. > extra_netfs_types="NO" # List of network extra filesystem types for delayed > # mount at startup (or NO). > @@ -276,6 +277,7 @@ ctld_enable="NO" # CAM Target Layer / iSCSI target da > local_unbound_enable="NO" # local caching resolver > blacklistd_enable="NO" # Run blacklistd daemon (YES/NO). > blacklistd_flags="" # Optional flags for blacklistd(8). > +resolv_enable="YES" # Enable resolv / resolvconf > > # > # kerberos. Do not run the admin daemons on slave servers > > Modified: head/etc/rc.d/resolv > ============================================================================== > --- head/etc/rc.d/resolv Thu Jan 18 20:12:12 2018 (r328135) > +++ head/etc/rc.d/resolv Thu Jan 18 20:45:41 2018 (r328136) > @@ -35,6 +35,7 @@ > > name="resolv" > desc="Create /etc/resolv.conf from kenv" > +start_cmd="${name}_start" > stop_cmd=':' > > load_rc_config $name > @@ -42,17 +43,20 @@ load_rc_config $name > # if the info is available via dhcp/kenv > # build the resolv.conf > # > -if [ -n "`/bin/kenv dhcp.domain-name-servers 2> /dev/null`" ]; then > - interface="`/bin/kenv boot.netif.name`" > - ( > - if [ -n "`/bin/kenv dhcp.domain-name 2> /dev/null`" ]; then > - echo domain `/bin/kenv dhcp.domain-name` > +resolv_start() > +{ > + if [ -n "`/bin/kenv dhcp.domain-name-servers 2> /dev/null`" ]; then > + interface="`/bin/kenv boot.netif.name`" > + ( > + if [ -n "`/bin/kenv dhcp.domain-name 2> /dev/null`" ]; then > + echo domain `/bin/kenv dhcp.domain-name` > + fi > + > + set -- `/bin/kenv dhcp.domain-name-servers` > + for ns in `IFS=','; echo $*`; do > + echo nameserver $ns > + done > + ) | /sbin/resolvconf -a ${interface}:dhcp4 > fi > - > - set -- `/bin/kenv dhcp.domain-name-servers` > - for ns in `IFS=','; echo $*`; do > - echo nameserver $ns > - done > - ) | /sbin/resolvconf -a ${interface}:dhcp4 > -fi > +} > I don't understand how it can work without. run_rc_command "$1" -- Emmanuel Vadot