mirror of
https://github.com/oSoWoSo/DistroHopper.git
synced 2026-06-14 09:32:21 +00:00
71 lines
2.1 KiB
Text
71 lines
2.1 KiB
Text
# Template file for 'ubuntu-server'
|
|
OSNAME="ubuntu-server"
|
|
PRETTY="Ubuntu Server"
|
|
LOGO=""
|
|
ICON="ubuntu-server.svg"
|
|
ICON_ONLINE="https://distrowatch.com/images/yvzhuwbpy/ubuntu-server.png"
|
|
CATEGORY="advanced"
|
|
BASEDOF="Debian"
|
|
DESCRIPTION="Brings economic and technical scalability to your datacentre, public or private. Whether you want to deploy an OpenStack cloud, a Kubernetes cluster or a 50,000-node render farm, Ubuntu Server delivers the best value scale-out performance available"
|
|
HOMEPAGE="https://ubuntu.com/server"
|
|
CREDENTIALS="-"
|
|
GPG=""
|
|
RSS=""
|
|
DW=""
|
|
MAGNET=""
|
|
CHAT=""
|
|
|
|
RELEASES="26.04 25.10 24.04 22.04 20.04 18.04 16.04 14.04 daily-live"
|
|
QEMU_ARCH="amd64"
|
|
|
|
releases_() {
|
|
local ALL_VERSIONS=()
|
|
# shellcheck disable=SC2207
|
|
ALL_VERSIONS=($(IFS=$'\n' web_pipe http://releases.ubuntu.com/streams/v1/com.ubuntu.releases:ubuntu-server.json | jq -r '.products[] | select(.arch=="amd64") | .version' | sort -rV))
|
|
echo daily-live "${ALL_VERSIONS[@]}"
|
|
}
|
|
|
|
get_() {
|
|
local HASH=""
|
|
local ISO=""
|
|
local NAME="live-server"
|
|
local URL=""
|
|
|
|
if [[ "${RELEASE}" == "daily"* ]]; then
|
|
URL="https://cdimage.ubuntu.com/${OS}/${RELEASE}/current"
|
|
else
|
|
URL="https://releases.ubuntu.com/${RELEASE}"
|
|
fi
|
|
|
|
case "${RELEASE}" in
|
|
14*|16*) NAME="server";;
|
|
esac
|
|
|
|
if web_check "${URL}/SHA256SUMS"; then
|
|
DATA=$(web_pipe "${URL}/SHA256SUMS" | grep "${NAME}" | grep amd64 | grep iso)
|
|
ISO=$(cut -d'*' -f2 <<<"${DATA}")
|
|
HASH=$(cut -d' ' -f1 <<<"${DATA}")
|
|
else
|
|
DATA=$(web_pipe "${URL}/MD5SUMS" | grep "${NAME}" | grep amd64 | grep iso)
|
|
ISO=$(cut -d' ' -f3 <<<"${DATA}")
|
|
HASH=$(cut -d' ' -f1 <<<"${DATA}")
|
|
fi
|
|
if [[ "${RELEASE}" == "daily"* ]] || [ "${RELEASE}" == "dvd" ]; then
|
|
zsync_get "${URL}/${ISO}" "${VM_PATH}" "${OS}-devel.iso"
|
|
make_vm_config "${OS}-devel.iso"
|
|
else
|
|
web_get "${URL}/${ISO}" "${VM_PATH}"
|
|
check_hash "${ISO}" "${HASH}"
|
|
make_vm_config "${ISO}"
|
|
fi
|
|
}
|
|
|
|
config_() {
|
|
# 22.04+ fails on LVM build if disk size is < 10G
|
|
# 22.04.1 fails on auto-install if TPM is disabled
|
|
echo "disk_size=\"10G\"" >> "${CONF_FILE}"
|
|
echo "ram=\"4G\"" >> "${CONF_FILE}"
|
|
if [[ "${RELEASE}" == *"22.04"* ]]; then
|
|
echo "tpm=\"on\"" >> "${CONF_FILE}"
|
|
fi
|
|
}
|