mirrorselect (bbddd8888aa9119746d3af3af98800b359ab3b40) mirrorselect (cc42ef5328963ee55c3305b136e9a86145f24594)
1#!/bin/sh
2#-
3# Copyright (c) 2011 Nathan Whitehorn
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions
8# are met:

--- 12 unchanged lines hidden (view full) ---

21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25# SUCH DAMAGE.
26#
27# $FreeBSD$
28
1#!/bin/sh
2#-
3# Copyright (c) 2011 Nathan Whitehorn
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions
8# are met:

--- 12 unchanged lines hidden (view full) ---

21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25# SUCH DAMAGE.
26#
27# $FreeBSD$
28
29BSDCFG_SHARE="/usr/share/bsdconfig"
30. $BSDCFG_SHARE/common.subr || exit 1
31
29: ${BSDDIALOG_OK=0}
30: ${BSDDIALOG_CANCEL=1}
31: ${BSDDIALOG_HELP=2}
32: ${BSDDIALOG_EXTRA=3}
33: ${BSDDIALOG_ESC=5}
34: ${BSDDIALOG_ERROR=255}
35
36exec 3>&1
32: ${BSDDIALOG_OK=0}
33: ${BSDDIALOG_CANCEL=1}
34: ${BSDDIALOG_HELP=2}
35: ${BSDDIALOG_EXTRA=3}
36: ${BSDDIALOG_ESC=5}
37: ${BSDDIALOG_ERROR=255}
38
39exec 3>&1
37MIRROR=`bsddialog --backtitle "FreeBSD Installer" \
40MIRROR=`bsddialog --backtitle "$OSNAME Installer" \
38 --title "Mirror Selection" --extra-button --extra-label "Other" \
39 --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!" \
40 0 0 16 \
41 ftp://ftp.freebsd.org "Main Site"\
42 ftp://ftp.freebsd.org "IPv6 Main Site"\
43 ftp://ftp3.ie.freebsd.org "IPv6 Ireland"\
44 ftp://ftp2.jp.freebsd.org "IPv6 Japan"\
45 ftp://ftp4.se.freebsd.org "IPv6 Sweden"\

--- 113 unchanged lines hidden (view full) ---

159case $MIRROR_BUTTON in
160$BSDDIALOG_ERROR | $BSDDIALOG_CANCEL | $BSDDIALOG_ESC)
161 exit 1
162 ;;
163$BSDDIALOG_OK)
164 ;;
165$BSDDIALOG_EXTRA)
166 exec 3>&1
41 --title "Mirror Selection" --extra-button --extra-label "Other" \
42 --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!" \
43 0 0 16 \
44 ftp://ftp.freebsd.org "Main Site"\
45 ftp://ftp.freebsd.org "IPv6 Main Site"\
46 ftp://ftp3.ie.freebsd.org "IPv6 Ireland"\
47 ftp://ftp2.jp.freebsd.org "IPv6 Japan"\
48 ftp://ftp4.se.freebsd.org "IPv6 Sweden"\

--- 113 unchanged lines hidden (view full) ---

162case $MIRROR_BUTTON in
163$BSDDIALOG_ERROR | $BSDDIALOG_CANCEL | $BSDDIALOG_ESC)
164 exit 1
165 ;;
166$BSDDIALOG_OK)
167 ;;
168$BSDDIALOG_EXTRA)
169 exec 3>&1
167 BSDINSTALL_DISTSITE=`bsddialog --backtitle "FreeBSD Installer" \
170 BSDINSTALL_DISTSITE=`bsddialog --backtitle "$OSNAME Installer" \
168 --title "Mirror Selection" \
171 --title "Mirror Selection" \
169 --inputbox "Please enter the URL to an alternate FreeBSD mirror:" \
172 --inputbox "Please enter the URL to an alternate $OSNAME mirror:" \
170 0 74 "$BSDINSTALL_DISTSITE" 2>&1 1>&3`
171 MIRROR_BUTTON=$?
172 exec 3>&-
173 test $MIRROR_BUTTON -eq $BSDDIALOG_OK || exec $0 $@
174 ;;
175esac
176
177export BSDINSTALL_DISTSITE
178echo $BSDINSTALL_DISTSITE >&2
173 0 74 "$BSDINSTALL_DISTSITE" 2>&1 1>&3`
174 MIRROR_BUTTON=$?
175 exec 3>&-
176 test $MIRROR_BUTTON -eq $BSDDIALOG_OK || exec $0 $@
177 ;;
178esac
179
180export BSDINSTALL_DISTSITE
181echo $BSDINSTALL_DISTSITE >&2