Changeset View
Changeset View
Standalone View
Standalone View
usr.sbin/bsdinstall/scripts/mirrorselect
Show All 20 Lines | |||||
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||||
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
# SUCH DAMAGE. | # SUCH DAMAGE. | ||||
# | # | ||||
# $FreeBSD$ | # $FreeBSD$ | ||||
BSDCFG_SHARE="/usr/share/bsdconfig" | |||||
. $BSDCFG_SHARE/common.subr || exit 1 | |||||
: ${BSDDIALOG_OK=0} | : ${BSDDIALOG_OK=0} | ||||
: ${BSDDIALOG_CANCEL=1} | : ${BSDDIALOG_CANCEL=1} | ||||
: ${BSDDIALOG_HELP=2} | : ${BSDDIALOG_HELP=2} | ||||
: ${BSDDIALOG_EXTRA=3} | : ${BSDDIALOG_EXTRA=3} | ||||
: ${BSDDIALOG_ESC=5} | : ${BSDDIALOG_ESC=5} | ||||
: ${BSDDIALOG_ERROR=255} | : ${BSDDIALOG_ERROR=255} | ||||
exec 3>&1 | exec 3>&1 | ||||
MIRROR=`bsddialog --backtitle "FreeBSD Installer" \ | MIRROR=`bsddialog --backtitle "$OSNAME Installer" \ | ||||
--title "Mirror Selection" --extra-button --extra-label "Other" \ | --title "Mirror Selection" --extra-button --extra-label "Other" \ | ||||
--menu "Please select the site closest to you or \"other\" if you'd like to specify a different choice. Also note that not every site listed here carries more than the base distribution kits. Only Primary sites are guaranteed to carry the full range of possible distributions. Select a site that's close!" \ | --menu "Please select the site closest to you or \"other\" if you'd like to specify a different choice. Also note that not every site listed here carries more than the base distribution kits. Only Primary sites are guaranteed to carry the full range of possible distributions. Select a site that's close!" \ | ||||
0 0 16 \ | 0 0 16 \ | ||||
ftp://ftp.freebsd.org "Main Site"\ | ftp://ftp.freebsd.org "Main Site"\ | ||||
ftp://ftp.freebsd.org "IPv6 Main Site"\ | ftp://ftp.freebsd.org "IPv6 Main Site"\ | ||||
ftp://ftp3.ie.freebsd.org "IPv6 Ireland"\ | ftp://ftp3.ie.freebsd.org "IPv6 Ireland"\ | ||||
ftp://ftp2.jp.freebsd.org "IPv6 Japan"\ | ftp://ftp2.jp.freebsd.org "IPv6 Japan"\ | ||||
ftp://ftp4.se.freebsd.org "IPv6 Sweden"\ | ftp://ftp4.se.freebsd.org "IPv6 Sweden"\ | ||||
▲ Show 20 Lines • Show All 113 Lines • ▼ Show 20 Lines | |||||
case $MIRROR_BUTTON in | case $MIRROR_BUTTON in | ||||
$BSDDIALOG_ERROR | $BSDDIALOG_CANCEL | $BSDDIALOG_ESC) | $BSDDIALOG_ERROR | $BSDDIALOG_CANCEL | $BSDDIALOG_ESC) | ||||
exit 1 | exit 1 | ||||
;; | ;; | ||||
$BSDDIALOG_OK) | $BSDDIALOG_OK) | ||||
;; | ;; | ||||
$BSDDIALOG_EXTRA) | $BSDDIALOG_EXTRA) | ||||
exec 3>&1 | exec 3>&1 | ||||
BSDINSTALL_DISTSITE=`bsddialog --backtitle "FreeBSD Installer" \ | BSDINSTALL_DISTSITE=`bsddialog --backtitle "$OSNAME Installer" \ | ||||
--title "Mirror Selection" \ | --title "Mirror Selection" \ | ||||
--inputbox "Please enter the URL to an alternate FreeBSD mirror:" \ | --inputbox "Please enter the URL to an alternate $OSNAME mirror:" \ | ||||
0 74 "$BSDINSTALL_DISTSITE" 2>&1 1>&3` | 0 74 "$BSDINSTALL_DISTSITE" 2>&1 1>&3` | ||||
MIRROR_BUTTON=$? | MIRROR_BUTTON=$? | ||||
exec 3>&- | exec 3>&- | ||||
test $MIRROR_BUTTON -eq $BSDDIALOG_OK || exec $0 $@ | test $MIRROR_BUTTON -eq $BSDDIALOG_OK || exec $0 $@ | ||||
;; | ;; | ||||
esac | esac | ||||
export BSDINSTALL_DISTSITE | export BSDINSTALL_DISTSITE | ||||
echo $BSDINSTALL_DISTSITE >&2 | echo $BSDINSTALL_DISTSITE >&2 |