Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Oct 2015 12:34:33 +0000 (UTC)
From:      Colin Percival <cperciva@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r289065 - head/usr.sbin/freebsd-update
Message-ID:  <201510091234.t99CYX3F049979@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 <release> 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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201510091234.t99CYX3F049979>