From c15fea5f7887cff6e9c18aabb25d451ae5d2777a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 18 Mar 2016 19:45:45 +0000 Subject: [PATCH] check_glibc on install check glibc will check in install if the server can run with glibc version installed or if glibc fix will get the server to run. Should this not be possible it will ber ecommendedto upgrade the server --- lgsm/functions/check_glibc.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 lgsm/functions/check_glibc.sh diff --git a/lgsm/functions/check_glibc.sh b/lgsm/functions/check_glibc.sh new file mode 100644 index 000000000..3647f4705 --- /dev/null +++ b/lgsm/functions/check_glibc.sh @@ -0,0 +1,23 @@ +#!/bin/bash +# LGSM check_glibc.sh function +# Author: Daniel Gibbs +# Website: http://gameservermanagers.com +lgsm_version="020116" + +# Description: Checks if server has correct glibc or has a fix available. + +info_glibc.sh + +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 + if [ "${glibcfix}" != "yes" ]; then + fn_print_warn_nl "Glibc fix: No Glibc fix available!" + echo -en "\n" + 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!" + sleep 5 + fi + echo -en "\n" +fi \ No newline at end of file