diff options
author | cperciva <cperciva@FreeBSD.org> | 2015-10-09 12:34:33 +0000 |
---|---|---|
committer | cperciva <cperciva@FreeBSD.org> | 2015-10-09 12:34:33 +0000 |
commit | 10b98e091ee253925f5ab5dd07c26c0cff0ddbef (patch) | |
tree | 030c0bb5b23b56f3571413206e2d985ebdd982ac /usr.sbin | |
parent | 9b6b02c02fa65773906c1249f20ce59b2f5f652b (diff) | |
download | FreeBSD-src-10b98e091ee253925f5ab5dd07c26c0cff0ddbef.zip FreeBSD-src-10b98e091ee253925f5ab5dd07c26c0cff0ddbef.tar.gz |
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
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/freebsd-update/freebsd-update.8 | 5 | ||||
-rw-r--r-- | usr.sbin/freebsd-update/freebsd-update.sh | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/usr.sbin/freebsd-update/freebsd-update.8 b/usr.sbin/freebsd-update/freebsd-update.8 index dcba710..c0c9ae0 100644 --- a/usr.sbin/freebsd-update/freebsd-update.8 +++ b/usr.sbin/freebsd-update/freebsd-update.8 @@ -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 diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh index 19d5198..9fcc012 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -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) |