Browse Source

renamed 2 variables

pull/820/merge
Daniel Gibbs 9 years ago
parent
commit
020c0f62cb
  1. 8
      lgsm/functions/check_glibc.sh
  2. 23
      lgsm/functions/command_details.sh
  3. 12
      lgsm/functions/fix_glibc.sh
  4. 42
      lgsm/functions/info_glibc.sh

8
lgsm/functions/check_glibc.sh

@ -8,13 +8,13 @@ lgsm_version="020116"
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
glibcversion="$(ldd --version | sed -n '1s/.* //p')"
if [ "$(printf '%s\n$glibcrequired\n' $glibcversion | sort -V | head -n 1)" != "${glibcrequired}" ]; 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 " * glibc required: $glibcrequired"
echo " * glibc installed: $glibcversion"
echo -en "\n"
fn_print_infomation "The game server will probably not work. A distro upgrade is required!"
sleep 5

23
lgsm/functions/command_details.sh

@ -160,24 +160,36 @@ fn_details_gameserver(){
fi
} | column -s $'\t' -t
echo -e ""
}
## script details
fn_details_script(){
#
# qlserver Script Details
# =====================================
# Service name: ql-server
# qlserver version: 150316
# User: lgsm
# Email notification: off
# Update on start: off
# Location: /home/lgsm/qlserver
# Config file: /home/lgsm/qlserver/serverfiles/baseq3/ql-server.cfg
echo -e "\e[92m${selfname} Script Details\e[0m"
printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
{
# service name
# Service name
echo -e "\e[34mService name:\t\e[0m${servicename}"
# script version
# Script version
if [ -n "${version}" ]; then
echo -e "\e[34m${selfname} version:\t\e[0m${version}"
fi
# script user
# User
echo -e "\e[34mUser:\t\e[0m$(whoami)"
# GLIBC required
if [ -n "${glibcrequired}" ] && [ "${glibcrequired}" != "UNKNOWN" ]; then
if [ -n "${glibcrequired}" ]; then
if [ "$(ldd --version | sed -n '1 p' | tr -cd '[:digit:]' | tail -c 3)" -lt "$(echo "${glibcrequired}" | sed -n '1 p' | tr -cd '[:digit:]' | tail -c 3)" ]; then
if [ "${glibcfix}" == "yes" ]; then
echo -e "\e[34mGLIBC required:\t\e[0;31m${glibcrequired} \e[0m(\e[0;32mUsing GLIBC fix\e[0m)"
@ -666,6 +678,7 @@ fn_details_os
fn_details_performance
fn_details_disk
fn_details_gameserver
fn_details_script
fn_details_backup
# Some game servers do not have parms.
if [ "${gamename}" != "Teamspeak 3" ]&&[ "${engine}" != "avalanche" ]&&[ "${engine}" != "dontstarve" ]&&[ "${engine}" != "projectzomboid" ]; then

12
lgsm/functions/fix_glibc.sh

@ -24,18 +24,18 @@ do
fi
done
glibc_version="$(ldd --version | sed 's/.* //;q')"
if [ "$(printf '%s\n'${glibc_required}'\n' ${glibc_version} | sort -V | head -n 1)" != "${glibc_required}" ]; then
glibcversion="$(ldd --version | sed 's/.* //;q')"
if [ "$(printf '%s\n'${glibcrequired}'\n' ${glibcversion} | sort -V | head -n 1)" != "${glibcrequired}" ]; 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: ${glibcrequired}"
echo " * glibc installed: ${glibcversion}"
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: ${glibcrequired}"
echo " * glibc installed: ${glibcversion}"
echo -en "\n"
fn_print_infomation "The game server will probably not work. A distro upgrade is required!"
fi

42
lgsm/functions/info_glibc.sh

@ -7,65 +7,65 @@ lgsm_version="260216"
# Description: stores details on servers Glibc requirements.
if [ "${gamename}" == "Blade Symphony" ]; then
glibc_required="2.15"
glibcrequired="2.15"
glibcfix="yes"
elif [ "${gamename}" == "BrainBread 2" ]; then
glibc_required="2.17"
glibcrequired="2.17"
elif [ "${gamename}" == "Double Action: Boogaloo" ]; then
glibc_required="2.15"
glibcrequired="2.15"
glibcfix="yes"
elif [ "${gamename}" == "Fistful of Frags" ]; then
glibc_required="2.15"
glibcrequired="2.15"
glibcfix="yes"
elif [ "${gamename}" == "Garry's Mod" ]; then
glibc_required="2.15"
glibcrequired="2.15"
glibcfix="yes"
elif [ "${gamename}" == "Insurgency" ]; then
glibc_required="2.15"
glibcrequired="2.15"
glibcfix="yes"
elif [ "${gamename}" == "No More Room in Hell" ]; then
glibc_required="2.15"
glibcrequired="2.15"
glibcfix="yes"
elif [ "${gamename}" == "Quake Live" ]; then
glibc_required="2.15"
glibcrequired="2.15"
glibcfix="no"
elif [ "${engine}" == "avalanche" ]; then
glibc_required="2.13"
glibcrequired="2.13"
glibcfix="yes"
elif [ "${engine}" == "dontstarve" ]; then
glibc_required="2.15"
glibcrequired="2.15"
glibcfix="no"
elif [ "${engine}" == "projectzomboid" ]; then
glibc_required="2.15"
glibcrequired="2.15"
glibcfix="yesno"
elif [ "${engine}" == "realvirtuality" ]; then
glibc_required="2.13"
glibcrequired="2.13"
glibcfix="yes"
elif [ "${engine}" == "seriousengine35" ]; then
glibc_required="2.13"
glibcrequired="2.13"
glibcfix="yes"
elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then
glibc_required="2.3.6"
glibcrequired="2.3.6"
glibcfix="no"
elif [ "${engine}" == "spark" ]; then
glibc_required="2.15"
glibcrequired="2.15"
glibcfix="yes"
elif [ "${engine}" == "starbound" ]; then
glibc_required="2.12"
glibcrequired="2.12"
glibcfix="no"
elif [ "${engine}" == "unreal" ]; then
glibc_required="2.1"
glibcrequired="2.1"
glibcfix="no"
elif [ "${engine}" == "unreal2" ]; then
glibc_required="2.4"
glibcrequired="2.4"
glibcfix="no"
elif [ "${engine}" == "unreal4" ]; then
glibc_required="2.14"
glibcrequired="2.14"
glibcfix="no"
elif [ "${engine}" == "unity3d" ]; then
glibc_required="2.15"
glibcrequired="2.15"
glibcfix="no"
else
glibc_required="UNKNOWN"
glibcrequired="UNKNOWN"
glibcfix="no"
fi

Loading…
Cancel
Save