From owner-svn-src-all@freebsd.org Fri Oct 9 12:34:34 2015 Return-Path: Delivered-To: svn-src-all@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 EC3AC9D29E4; Fri, 9 Oct 2015 12:34:34 +0000 (UTC) (envelope-from cperciva@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 mx1.freebsd.org (Postfix) with ESMTPS id 9F19DB3E; Fri, 9 Oct 2015 12:34:34 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t99CYX7E049981; Fri, 9 Oct 2015 12:34:33 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t99CYX3F049979; Fri, 9 Oct 2015 12:34:33 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201510091234.t99CYX3F049979@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Fri, 9 Oct 2015 12:34:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289065 - head/usr.sbin/freebsd-update X-SVN-Group: head 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.20 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: Fri, 09 Oct 2015 12:34:35 -0000 Author: cperciva Date: Fri Oct 9 12:34:33 2015 New Revision: 289065 URL: https://svnweb.freebsd.org/changeset/base/289065 Log: Add --currently-running option to freebsd-update. This option tells freebsd-update to act as if it is running a specific release instead of querying the kernel. In particular, this can be useful when upgrading jails. Requested by: EuroBSDCon devsummit jails session Tested by: allanjude MFC after: 1 week Modified: head/usr.sbin/freebsd-update/freebsd-update.8 head/usr.sbin/freebsd-update/freebsd-update.sh Modified: head/usr.sbin/freebsd-update/freebsd-update.8 ============================================================================== --- head/usr.sbin/freebsd-update/freebsd-update.8 Fri Oct 9 12:11:37 2015 (r289064) +++ head/usr.sbin/freebsd-update/freebsd-update.8 Fri Oct 9 12:34:33 2015 (r289065) @@ -113,6 +113,11 @@ Please do not run .Nm Cm fetch from crontab or similar using this flag, see: .Nm Cm cron +.It Fl -currently-running Ar release +Don't detect the currently-running release; instead, assume that the +system is running the specified +.Ar release . +This is most likely to be useful when upgrading jails. .El .Sh COMMANDS The Modified: head/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- head/usr.sbin/freebsd-update/freebsd-update.sh Fri Oct 9 12:11:37 2015 (r289064) +++ head/usr.sbin/freebsd-update/freebsd-update.sh Fri Oct 9 12:34:33 2015 (r289065) @@ -52,6 +52,8 @@ Options: (default: root) --not-running-from-cron -- Run without a tty, for use by automated tools + --currently-running release + -- Update as if currently running this release Commands: fetch -- Fetch updates from server cron -- Sleep rand(3600) seconds, fetch updates, and send an @@ -434,6 +436,9 @@ parse_cmdline () { --not-running-from-cron) NOTTYOK=1 ;; + --currently-running) + shift; export UNAME_r="$1" + ;; # Configuration file equivalents -b)