svn commit: r343271 - head/usr.sbin/freebsd-update
Ed Maste
emaste at FreeBSD.org
Mon Jan 21 19:21:12 UTC 2019
Author: emaste
Date: Mon Jan 21 19:21:11 2019
New Revision: 343271
URL: https://svnweb.freebsd.org/changeset/base/343271
Log:
freebsd-update: Allow upgrade from pre-release builds
Update r343122 to include -ALPHA, -BETA and -RC releases as
upgrade-able via freebsd-update.
PR: 234771
Submitted by: Gerald Aryeetey <aryeeteygerald_rogers.com>
Reported by: delphij, des
Reviewed by: delphij
MFC with: r343122
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D18881
Modified:
head/usr.sbin/freebsd-update/freebsd-update.sh
Modified: head/usr.sbin/freebsd-update/freebsd-update.sh
==============================================================================
--- head/usr.sbin/freebsd-update/freebsd-update.sh Mon Jan 21 19:04:37 2019 (r343270)
+++ head/usr.sbin/freebsd-update/freebsd-update.sh Mon Jan 21 19:21:11 2019 (r343271)
@@ -668,17 +668,23 @@ fetchupgrade_check_params () {
FETCHDIR=${RELNUM}/${ARCH}
PATCHDIR=${RELNUM}/${ARCH}/bp
- # Disallow upgrade from a version that is not `-RELEASE`
- if ! echo "${RELNUM}" | grep -qE -- "-RELEASE$"; then
- echo -n "`basename $0`: "
- cat <<- EOF
- Cannot upgrade from a version that is not a '-RELEASE' using `basename $0`.
- Instead, FreeBSD can be directly upgraded by source or upgraded to a
- RELEASE/RELENG version prior to running `basename $0`.
- EOF
- echo "System version: ${RELNUM}"
- exit 1
- fi
+ # Disallow upgrade from a version that is not a release
+ case ${RELNUM} in
+ *-RELEASE | *-ALPHA* | *-BETA* | *-RC*)
+ ;;
+ *)
+ echo -n "`basename $0`: "
+ cat <<- EOF
+ Cannot upgrade from a version that is not a release
+ (including alpha, beta and release candidates)
+ using `basename $0`. Instead, FreeBSD can be directly
+ upgraded by source or upgraded to a RELEASE/RELENG version
+ prior to running `basename $0`.
+ Currently running: ${RELNUM}
+ EOF
+ exit 1
+ ;;
+ esac
# Figure out what directory contains the running kernel
BOOTFILE=`sysctl -n kern.bootfile`
More information about the svn-src-all
mailing list