From owner-svn-src-all@freebsd.org Sat Mar 10 20:13:08 2018 Return-Path: Delivered-To: svn-src-all@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 3BD16F2F910; Sat, 10 Mar 2018 20:13:08 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D1A52822A1; Sat, 10 Mar 2018 20:13:07 +0000 (UTC) (envelope-from jamie@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C6F9F1290D; Sat, 10 Mar 2018 20:13:07 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2AKD7MF039282; Sat, 10 Mar 2018 20:13:07 GMT (envelope-from jamie@FreeBSD.org) Received: (from jamie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2AKD78X039280; Sat, 10 Mar 2018 20:13:07 GMT (envelope-from jamie@FreeBSD.org) Message-Id: <201803102013.w2AKD78X039280@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jamie set sender to jamie@FreeBSD.org using -f From: Jamie Gritton Date: Sat, 10 Mar 2018 20:13:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330743 - in head: etc/rc.d share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: jamie X-SVN-Commit-Paths: in head: etc/rc.d share/man/man5 X-SVN-Commit-Revision: 330743 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 20:13:08 -0000 Author: jamie Date: Sat Mar 10 20:13:07 2018 New Revision: 330743 URL: https://svnweb.freebsd.org/changeset/base/330743 Log: Don't warn when the "hostname" rc variable is unset, but the hostname is already non-empty (common in jails). Modified: head/etc/rc.d/hostname head/share/man/man5/rc.conf.5 Modified: head/etc/rc.d/hostname ============================================================================== --- head/etc/rc.d/hostname Sat Mar 10 18:07:31 2018 (r330742) +++ head/etc/rc.d/hostname Sat Mar 10 20:13:07 2018 (r330743) @@ -60,9 +60,11 @@ hostname_start() # Have we got a hostname yet? # if [ -z "${hostname}" ]; then - # Null hostname is probably OK if DHCP is in use. + # Null hostname is probably OK if DHCP is in use, + # or when hostname is already set (common for jails). # - if [ -z "`list_net_interfaces dhcp`" ]; then + if [ -z "`list_net_interfaces dhcp`" -a \ + -z "`/bin/hostname`" ]; then warn "\$hostname is not set -- see rc.conf(5)." fi return Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Sat Mar 10 18:07:31 2018 (r330742) +++ head/share/man/man5/rc.conf.5 Sat Mar 10 20:13:07 2018 (r330743) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 15, 2018 +.Dd March 10, 2018 .Dt RC.CONF 5 .Os .Sh NAME @@ -421,6 +421,9 @@ If .Xr dhclient 8 is used to set the hostname via DHCP, this variable should be set to an empty string. +Within a +.Xr jail 8 +the hostname is generally already set and this variable may absent. If this value remains unset when the system is done booting your console login will display the default hostname of .Dq Amnesiac .