summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgjb <gjb@FreeBSD.org>2012-12-09 22:53:53 +0000
committergjb <gjb@FreeBSD.org>2012-12-09 22:53:53 +0000
commit972c593040062318ce2414510340540d5398a1de (patch)
tree0724705e8c93cb155098816f429f5c255d3e954e
parent1c6e1dc79b25157b90e943742dc9339b0e3fe9d9 (diff)
downloadFreeBSD-src-972c593040062318ce2414510340540d5398a1de.zip
FreeBSD-src-972c593040062318ce2414510340540d5398a1de.tar.gz
Get 'uname -r' earlier, so it can be used to determine what branch is
being run to set BSDINSTALL_DISTSITE accordingly. This change allows non-RELEASE branches to use the FTP snapshots directory for bootonly.iso installations. Approved by: simon
-rwxr-xr-xusr.sbin/bsdinstall/scripts/mirrorselect13
1 files changed, 12 insertions, 1 deletions
diff --git a/usr.sbin/bsdinstall/scripts/mirrorselect b/usr.sbin/bsdinstall/scripts/mirrorselect
index 5df45dc..26bd5ea 100755
--- a/usr.sbin/bsdinstall/scripts/mirrorselect
+++ b/usr.sbin/bsdinstall/scripts/mirrorselect
@@ -191,7 +191,18 @@ MIRROR=`dialog --backtitle "FreeBSD Installer" \
MIRROR_BUTTON=$?
exec 3>&-
-BSDINSTALL_DISTSITE="$MIRROR/pub/FreeBSD/releases/`uname -m`/`uname -p`/`uname -r`"
+_UNAME_R=`uname -r`
+
+case ${_UNAME_R} in
+ *-CURRENT|*-STABLE|*-PRERELEASE|*-RC*)
+ RELDIR="snapshots"
+ ;;
+ *)
+ RELDIR="releases"
+ ;;
+esac
+
+BSDINSTALL_DISTSITE="$MIRROR/pub/FreeBSD/${RELDIR}/`uname -m`/`uname -p`/${_UNAME_R}"
case $MIRROR_BUTTON in
$DIALOG_CANCEL)
OpenPOWER on IntegriCloud