Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F145085435
D18803.id52715.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D18803.id52715.diff
View Options
Index: usr.sbin/freebsd-update/freebsd-update.sh
===================================================================
--- usr.sbin/freebsd-update/freebsd-update.sh
+++ usr.sbin/freebsd-update/freebsd-update.sh
@@ -304,6 +304,14 @@
fi
}
+# Pretend current release is FreeBSD $1
+config_SourceRelease () {
+ UNAME_r=$1
+ if echo ${UNAME_r} | grep -qE '^[0-9.]+$'; then
+ UNAME_r="${UNAME_r}-RELEASE"
+ fi
+}
+
# Define what happens to output of utilities
config_VerboseLevel () {
if [ -z ${VERBOSELEVEL} ]; then
@@ -442,7 +450,8 @@
NOTTYOK=1
;;
--currently-running)
- shift; export UNAME_r="$1"
+ shift
+ config_SourceRelease $1 || usage
;;
# Configuration file equivalents
@@ -658,6 +667,18 @@
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
+
# Figure out what directory contains the running kernel
BOOTFILE=`sysctl -n kern.bootfile`
KERNELDIR=${BOOTFILE%/kernel}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Feb 16, 7:45 PM (15 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28787976
Default Alt Text
D18803.id52715.diff (1 KB)
Attached To
Mode
D18803: Clarify unsupported release upgrade error message
Attached
Detach File
Event Timeline
Log In to Comment