Skip to content

Commit

Permalink
Merge pull request #61 from jean-edouard/stable-7-https
Browse files Browse the repository at this point in the history
STABLE-7: OXT-1248: Add https support
  • Loading branch information
eric-ch authored Nov 17, 2017
2 parents 85abe2a + fcc6ba6 commit 4e29077
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
13 changes: 10 additions & 3 deletions part1/stages/Configure-network-repo
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,16 @@ validate_repo_address()
http)
TEST="$(echo ${ADDR} | sed -ne '/^http:\/\/.*$/p')"
;;
https)
TEST="$(echo ${ADDR} | sed -ne '/^https:\/\/.*$/p')"
;;
ftp)
TEST="$(echo ${ADDR} | sed -ne '/^ftp:\/\/.*$/p')"
;;
nfs)
# Ensure that there is no "http", "ftp" or "nfs" prefix.
# (nfs just specifies mount arg, eg. "12.34.5.6:/foo/bar")
TEST=$(echo "${ADDR}" | sed -e '/^\(ftp\|http\|nfs\):/d' -ne '/^[^:]\+:[^:]*$/p')
TEST=$(echo "${ADDR}" | sed -e '/^\(ftp\|http\|https\|nfs\):/d' -ne '/^[^:]\+:[^:]*$/p')
;;
*) # this shouldn't happen:
return 1
Expand Down Expand Up @@ -88,12 +91,16 @@ get_default_string()
DEFAULT_REPO="$(echo ${ADDR} | sed -ne '/^http:\/\//p')"
[ ! -z "${DEFAULT_REPO}" ] || DEFAULT_REPO="http://foo.bar/baz"
;;
https)
DEFAULT_REPO="$(echo ${ADDR} | sed -ne '/^https:\/\//p')"
[ ! -z "${DEFAULT_REPO}" ] || DEFAULT_REPO="https://foo.bar/baz"
;;
ftp)
DEFAULT_REPO="$(echo ${ADDR} | sed -ne '/^ftp:\/\//p')"
[ ! -z "${DEFAULT_REPO}" ] || DEFAULT_REPO="ftp://foo.bar/baz"
;;
nfs)
DEFAULT_REPO="$(echo ${ADDR} | sed -e '/^\(ftp\|http\):\/\//d')"
DEFAULT_REPO="$(echo ${ADDR} | sed -e '/^\(ftp\|http\|https\):\/\//d')"
[ ! -z "${DEFAULT_REPO}" ] || DEFAULT_REPO="1.2.3.4:/foo/bar"
;;
esac
Expand Down Expand Up @@ -129,7 +136,7 @@ parse_source_type()
REPO="$2"
SOURCE_TYPE=$(read_xml_attr "${ANSF}" "source" "type")
case ${SOURCE_TYPE} in
url) echo "${REPO}" | sed -ne 's/^\(http\|ftp\):.*$/\1/p'
url) echo "${REPO}" | sed -ne 's/^\(http\|https\|ftp\):.*$/\1/p'
;;
nfs) echo "nfs"
;;
Expand Down
2 changes: 1 addition & 1 deletion part1/stages/Download-install-files
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ exit_bad_transfer()
empty_download_dir || exit ${Abort}

case ${NETWORK_PROTOCOL} in
http|ftp)
http|https|ftp)
do_wget_transfer "${NETWORK_REPO}" || exit_bad_transfer
;;
nfs)
Expand Down

0 comments on commit 4e29077

Please sign in to comment.