ubuntu jammy topgrade fix for libssl1.1

This commit is contained in:
deathbybandaid 2023-12-17 10:18:17 -05:00
parent 1f5d655d9e
commit 640ac3b41b
2 changed files with 29 additions and 0 deletions

View File

@ -54,6 +54,18 @@ else
update_topgrade
fi
# Ubuntu Jammy need focal repo to get this
if ! is_shared_lib_present libssl.so.1.1
then
if get_dist == "Ubuntu" ]]
then
printf "$COL_YELLOW" "** libssl.so.1.1 library missing, installing now"
echo "deb http://security.ubuntu.com/ubuntu focal-security main" | sudo tee /etc/apt/sources.list.d/focal-security.list
apt update
apt install -y libssl1.1
fi
fi
printf "$COL_LIGHT_BLUE" "checking for topgrade confs"
custom_topgrade_confs_path="/etc/topgrade"
custom_topgrade_confs_git="https://git.deathbybandaid.net/deathbybandaid/topgrade.git"

View File

@ -1,5 +1,9 @@
#!/bin/bash
get_dist() {
echo $(lsb_release -si)
}
is_command() {
local check_command="$1"
command -v "${check_command}" >/dev/null 2>&1
@ -97,3 +101,16 @@ service_exists() {
return 1
fi
}
is_shared_lib_present() {
local libtocheck="$1"
printf "$COL_YELLOW" "Checking if Shared library is installed: $libtocheck"
if ! ldconfig -p | grep $libtocheck
then
printf "$COL_YELLOW" "$libtocheck is not installed"
return 0
else
printf "$COL_YELLOW" "$libtocheck is installed"
return 1
fi
}