1if [ ! "$_MEDIA_HTTP_SUBR" ]; then _MEDIA_HTTP_SUBR=1
2#
3# Copyright (c) 2012-2013 Devin Teske
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:
--- 10 unchanged lines hidden (view full) ---
19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
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: head/usr.sbin/bsdconfig/share/media/http.subr 257819 2013-11-07 21:38:46Z dteske $
28#
29############################################################ INCLUDES
30
31BSDCFG_SHARE="/usr/share/bsdconfig"
32. $BSDCFG_SHARE/common.subr || exit 1
33f_dprintf "%s: loading includes..." media/http.subr
34f_include $BSDCFG_SHARE/device.subr
35f_include $BSDCFG_SHARE/dialog.subr
--- 461 unchanged lines hidden (view full) ---
497 # through the list of directories looking for a release
498 # directory. First successful path wins.
499 #
500 local fdir hp
501 f_getvar $VAR_HTTP_PATH%/ hp
502 setvar $VAR_HTTP_PATH "$hp/$PKG_ABI/latest"
503 if [ "$PKG_ABI" ] && f_http_check_access; then
504 http_found=$SUCCESS
505 else
506 for fdir in $HTTP_DIRS; do
507 setvar $VAR_HTTP_PATH "$hp/$fdir/$rel"
508 if f_http_check_access; then
509 http_found=$SUCCESS
510 break
511 fi
512 done
--- 177 unchanged lines hidden ---
2#
3# Copyright (c) 2012-2013 Devin Teske
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:
--- 10 unchanged lines hidden (view full) ---
19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
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: head/usr.sbin/bsdconfig/share/media/http.subr 257819 2013-11-07 21:38:46Z dteske $
28#
29############################################################ INCLUDES
30
31BSDCFG_SHARE="/usr/share/bsdconfig"
32. $BSDCFG_SHARE/common.subr || exit 1
33f_dprintf "%s: loading includes..." media/http.subr
34f_include $BSDCFG_SHARE/device.subr
35f_include $BSDCFG_SHARE/dialog.subr
--- 461 unchanged lines hidden (view full) ---
497 # through the list of directories looking for a release
498 # directory. First successful path wins.
499 #
500 local fdir hp
501 f_getvar $VAR_HTTP_PATH%/ hp
502 setvar $VAR_HTTP_PATH "$hp/$PKG_ABI/latest"
503 if [ "$PKG_ABI" ] && f_http_check_access; then
504 http_found=$SUCCESS
505 else
506 for fdir in $HTTP_DIRS; do
507 setvar $VAR_HTTP_PATH "$hp/$fdir/$rel"
508 if f_http_check_access; then
509 http_found=$SUCCESS
510 break
511 fi
512 done
--- 177 unchanged lines hidden ---