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