Browse Source

Glibc checking should work correctly

pull/820/merge
Daniel Gibbs 9 years ago
parent
commit
4e6c61c29f
  1. 17
      lgsm/functions/fix_glibc.sh

17
lgsm/functions/fix_glibc.sh

@ -2,13 +2,12 @@
# LGSM fix_glibc.sh function
# Author: Daniel Gibbs
# Website: http://gameservermanagers.com
lgsm_version="020116"
lgsm_version="220416"
# Description: Downloads required glibc files and applys teh glibc fix if required
info_glibc.sh
local libstdc_servers_array=( "ARMA 3" "Blade Symphony" "Garry's Mod" "Just Cause 2" )
for libstdc_server in "${libstdc_servers_array[@]}"
do
@ -25,22 +24,20 @@ do
fi
done
glibc_version="$(ldd --version | sed -n '1s/.* //p')"
if [ "$(printf '%s\n$glibc_required\n' $glibc_version | sort -V | head -n 1)" != "${glibc_required}" ]; then
glibc_version="$(ldd --version | sed 's/.* //;q')"
if [ "$(printf '%s\n'${glibc_required}'\n' ${glibc_version} | sort -V | head -n 1)" != "${glibc_required}" ]; then
if [ "${glibcfix}" == "yes" ]; then
fn_print_info_nl "Glibc fix: Using Glibc fix"
echo " * glibc required: $glibc_required"
echo " * glibc installed: $glibc_version"
echo " * glibc required: ${glibc_required}"
echo " * glibc installed: ${glibc_version}"
export LD_LIBRARY_PATH=:"${libdir}"
else
fn_print_warn_nl "Glibc fix: No Glibc fix available!"
echo -en "\n"
echo " * glibc required: $glibc_required"
echo " * glibc installed: $glibc_version"
echo " * glibc required: ${glibc_required}"
echo " * glibc installed: ${glibc_version}"
echo -en "\n"
fn_print_infomation "The game server will probably not work. A distro upgrade is required!"
fi
echo -en "\n"
else
echo "GLIBC is OK no fix required"
fi
Loading…
Cancel
Save