add Slackware as supported OS

This commit is contained in:
Lanius 2022-02-20 00:26:24 +01:00
parent ace017236c
commit 1d9de9c06a

View File

@ -72,6 +72,7 @@ function pretty_name() {
popos) PRETTY_NAME="Pop!_OS";; popos) PRETTY_NAME="Pop!_OS";;
regolith) PRETTY_NAME="Regolith Linux";; regolith) PRETTY_NAME="Regolith Linux";;
rockylinux) PRETTY_NAME="Rocky Linux";; rockylinux) PRETTY_NAME="Rocky Linux";;
slackware) PRETTY_NAME="Slackware Linux";;
ubuntu-budgie) PRETTY_NAME="Ubuntu Budgie";; ubuntu-budgie) PRETTY_NAME="Ubuntu Budgie";;
ubuntu-kylin) PRETTY_NAME="Ubuntu Kylin";; ubuntu-kylin) PRETTY_NAME="Ubuntu Kylin";;
ubuntu-mate) PRETTY_NAME="Ubuntu MATE";; ubuntu-mate) PRETTY_NAME="Ubuntu MATE";;
@ -228,6 +229,7 @@ function os_support() {
popos \ popos \
regolith \ regolith \
rockylinux \ rockylinux \
slackware \
solus \ solus \
tails \ tails \
ubuntu \ ubuntu \
@ -425,6 +427,12 @@ function releases_rockylinux() {
8.0 8.0
} }
function releases_slackware() {
echo 14.2 \
15.0 \
current
}
function releases_solus() { function releases_solus() {
echo 4.3-budgie \ echo 4.3-budgie \
4.3-gnome \ 4.3-gnome \
@ -648,7 +656,7 @@ function make_vm_config() {
case "${OS}" in case "${OS}" in
alma | android | archlinux | debian | elementary | fedora | kali | \ alma | android | archlinux | debian | elementary | fedora | kali | \
garuda | kdeneon | linuxmint* | nixos* | opensuse | oraclelinux | \ garuda | kdeneon | linuxmint* | nixos* | opensuse | oraclelinux | \
popos | regolith | rockylinux | solus | *ubuntu* | zorin ) popos | regolith | rockylinux | slackware | solus | *ubuntu* | zorin )
GUEST="linux" GUEST="linux"
IMAGE_TYPE="iso";; IMAGE_TYPE="iso";;
freebsd ) freebsd )
@ -718,6 +726,11 @@ EOF
echo "disk_size=\"32G\"" >> "${OS}-${RELEASE}.conf" echo "disk_size=\"32G\"" >> "${OS}-${RELEASE}.conf"
fi fi
if [ "${OS}" == "slackware" ]; then
echo "disk_size=\"32G\"" >> "${OS}-${RELEASE}.conf"
echo "boot=\"legacy\"" >> "${OS}-${RELEASE}.conf"
fi
if [ "${OS}" == "haiku" ]; then if [ "${OS}" == "haiku" ]; then
echo "boot=\"legacy\"" >> "${OS}-${RELEASE}.conf" echo "boot=\"legacy\"" >> "${OS}-${RELEASE}.conf"
echo "disk_size=\"32G\"" >> "${OS}-${RELEASE}.conf" echo "disk_size=\"32G\"" >> "${OS}-${RELEASE}.conf"
@ -1212,6 +1225,28 @@ function get_rocky() {
make_vm_config "${ISO}" make_vm_config "${ISO}"
} }
function get_slackware() {
local HASH=""
local ISO=""
local URL=""
local arch="64"
if [[ "${RELEASE}" == "current" ]]; then
URL="https://slackware.nl/slackware/slackware${arch}-current-iso/slackware${arch}-current-install-dvd.iso"
else
URL="https://mirrors.slackware.com/slackware/slackware-iso/slackware${arch}-${RELEASE}-iso/slackware${arch}-${RELEASE}-install-dvd.iso"
fi
ISO="slackware${arch}-${RELEASE}-install-dvd.iso"
HASH=$(wget -q -O- "${URL}.md5")
web_get "${URL}" "${VM_PATH}"
check_hash "${ISO}" "${HASH}"
make_vm_config "${ISO}"
}
function get_solus() { function get_solus() {
local RELNUM="" local RELNUM=""
local RELTYPE="" local RELTYPE=""
@ -2070,6 +2105,8 @@ if [ -n "${2}" ]; then
get_opensuse get_opensuse
elif [ "${OS}" == "oraclelinux" ]; then elif [ "${OS}" == "oraclelinux" ]; then
get_oraclelinux get_oraclelinux
elif [ "${OS}" == "slackware" ]; then
get_slackware
elif [ "${OS}" == "popos" ]; then elif [ "${OS}" == "popos" ]; then
if [ -n "${3}" ]; then if [ -n "${3}" ]; then
DRIVER="${3}" DRIVER="${3}"
@ -2185,6 +2222,8 @@ else
releases_regolith releases_regolith
elif [ "${OS}" == "rockylinux" ]; then elif [ "${OS}" == "rockylinux" ]; then
releases_rockylinux releases_rockylinux
elif [ "${OS}" == "slackware" ]; then
releases_slackware
elif [ "${OS}" == "solus" ]; then elif [ "${OS}" == "solus" ]; then
releases_solus releases_solus
elif [[ "${OS}" == "tails"* ]]; then elif [[ "${OS}" == "tails"* ]]; then
@ -2210,4 +2249,4 @@ fi
echo "Error: You must supply an OS!" echo "Error: You must supply an OS!"
os_support os_support
exit 1 exit 1
fi fi