Date: Mon, 21 Jan 2019 19:21:11 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343271 - head/usr.sbin/freebsd-update Message-ID: <201901211921.x0LJLB14038335@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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`
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201901211921.x0LJLB14038335>