mirror of
https://github.com/oSoWoSo/DistroHopper.git
synced 2024-08-14 22:46:53 +00:00
Refactor get_oraclelinux() to add create_vm() compatibility
This commit is contained in:
parent
3e5af6378a
commit
c553e404c9
1 changed files with 8 additions and 14 deletions
22
quickget
22
quickget
|
@ -1048,22 +1048,16 @@ function get_opensuse() {
|
|||
function get_oraclelinux() {
|
||||
local HASH=""
|
||||
local ISO=""
|
||||
local URL=""
|
||||
local VER_MAJ=""
|
||||
local VER_MIN=""
|
||||
local VER_MAJ=${RELEASE::1}
|
||||
local VER_MIN=${RELEASE:2:1}
|
||||
local URL="https://yum.oracle.com/ISOS/OracleLinux/OL${VER_MAJ}/u${VER_MIN}/x86_64/"
|
||||
|
||||
VER_MAJ=${RELEASE::1}
|
||||
VER_MIN=${RELEASE:2:1}
|
||||
URL="https://yum.oracle.com/ISOS/OracleLinux/OL${VER_MAJ}/u${VER_MIN}/x86_64/"
|
||||
if [ "${VER_MAJ}" == "8" ]; then
|
||||
ISO="OracleLinux-R${VER_MAJ}-U${VER_MIN}-x86_64-dvd.iso"
|
||||
else
|
||||
ISO="OracleLinux-R${VER_MAJ}-U${VER_MIN}-Server-x86_64-dvd.iso"
|
||||
fi
|
||||
case ${VER_MAJ} in
|
||||
8) ISO="OracleLinux-R${VER_MAJ}-U${VER_MIN}-x86_64-dvd.iso";;
|
||||
*) ISO="OracleLinux-R${VER_MAJ}-U${VER_MIN}-Server-x86_64-dvd.iso";;
|
||||
esac
|
||||
HASH=$(wget -q -O- "https://linux.oracle.com/security/gpg/checksum/OracleLinux-R${VER_MAJ}-U${VER_MIN}-Server-x86_64.checksum" | grep "${ISO}" | cut -d' ' -f1)
|
||||
web_get "${URL}/${ISO}" "${VM_PATH}"
|
||||
check_hash "${ISO}" "${HASH}"
|
||||
make_vm_config "${ISO}"
|
||||
echo "${URL}/${ISO} ${HASH}"
|
||||
}
|
||||
|
||||
function get_popos() {
|
||||
|
|
Loading…
Reference in a new issue