From owner-svn-ports-all@FreeBSD.ORG Tue Mar 31 01:26:20 2015 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 827F7D4A; Tue, 31 Mar 2015 01:26:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 535548DC; Tue, 31 Mar 2015 01:26:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2V1QKqU047711; Tue, 31 Mar 2015 01:26:20 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2V1QJkE047706; Tue, 31 Mar 2015 01:26:19 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201503310126.t2V1QJkE047706@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Tue, 31 Mar 2015 01:26:19 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r382788 - in head/sysutils/firstboot-freebsd-update: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2015 01:26:20 -0000 Author: cperciva Date: Tue Mar 31 01:26:19 2015 New Revision: 382788 URL: https://svnweb.freebsd.org/changeset/ports/382788 QAT: https://qat.redports.org/buildarchive/r382788/ Log: Teach the firstboot-freebsd-update script to disable itself if it is run on something other than *-BETA*, *-RC*, or *-RELEASE*. There won't be any bits available to download, and if we don't disable it then the first boot will be slowed down due to freebsd-update trying all of the available mirrors. Modified: head/sysutils/firstboot-freebsd-update/Makefile head/sysutils/firstboot-freebsd-update/files/firstboot_freebsd_update.in Modified: head/sysutils/firstboot-freebsd-update/Makefile ============================================================================== --- head/sysutils/firstboot-freebsd-update/Makefile Mon Mar 30 23:25:33 2015 (r382787) +++ head/sysutils/firstboot-freebsd-update/Makefile Tue Mar 31 01:26:19 2015 (r382788) @@ -1,7 +1,7 @@ # $FreeBSD$ PORTNAME= firstboot-freebsd-update -PORTVERSION= 1.1 +PORTVERSION= 1.2 CATEGORIES= sysutils MASTER_SITES= # none DISTFILES= # none Modified: head/sysutils/firstboot-freebsd-update/files/firstboot_freebsd_update.in ============================================================================== --- head/sysutils/firstboot-freebsd-update/files/firstboot_freebsd_update.in Mon Mar 30 23:25:33 2015 (r382787) +++ head/sysutils/firstboot-freebsd-update/files/firstboot_freebsd_update.in Tue Mar 31 01:26:19 2015 (r382788) @@ -9,10 +9,18 @@ # image, since this only runs on the first boot) to enable this: # # firstboot_freebsd_update_enable="YES" +# +# By default this script will only run on *-BETA*, *-RC*, and *-RELEASE* +# systems, since those are the only ones for which updates are provided by +# the FreeBSD project; to run freebsd-update anyway (e.g., on a custom +# release for which you are providing your own update bits), set: +# +# firstboot_freebsd_update_nonstandard="YES" . /etc/rc.subr : ${firstboot_freebsd_update_enable:="NO"} +: ${firstboot_freebsd_update_nonstandard:="NO"} name="firstboot_freebsd_update" rcvar=firstboot_freebsd_update_enable @@ -22,6 +30,17 @@ stop_cmd=":" firstboot_freebsd_update_run() { + if ! checkyesno firstboot_freebsd_update_nonstandard; then + case "`uname -r`" in + *-BETA* | *-RC* | *-RELEASE*) + ;; + *) + echo "Firstboot freebsd-update disabled on `uname -r`" + return 0 + ;; + esac + fi + freebsd-update fetch if [ -e /var/db/freebsd-update/`echo / | sha256`-install ]; then freebsd-update install