From 972c593040062318ce2414510340540d5398a1de Mon Sep 17 00:00:00 2001 From: gjb Date: Sun, 9 Dec 2012 22:53:53 +0000 Subject: [PATCH] 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 --- usr.sbin/bsdinstall/scripts/mirrorselect | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/usr.sbin/bsdinstall/scripts/mirrorselect b/usr.sbin/bsdinstall/scripts/mirrorselect index 5df45dcd815b..26bd5ea3615b 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)