diff --git a/lgsm/functions/check.sh b/lgsm/functions/check.sh index 9fb6058e8..2e90627a7 100644 --- a/lgsm/functions/check.sh +++ b/lgsm/functions/check.sh @@ -17,9 +17,13 @@ if [ "${function_selfname}" != "command_install.sh" ] && [ "${function_selfname} check_system_dir.sh fi -if [ "${function_selfname}" == "command_install.sh" ]; then - check_glibc.sh -fi +local allowed_commands_array=( command_debug.sh command_start.sh command_stop.sh command_install.sh ) +for allowed_command in "${allowed_commands_array[@]}" +do + if [ "${allowed_command}" == "${function_selfname}" ]; then + check_glibc.sh + fi +done local allowed_commands_array=( command_backup.sh command_console.sh command_debug.sh command_details.sh command_unreal2_maps.sh command_ut99_maps.sh command_monitor.sh command_start.sh command_stop.sh update_check.sh command_validate.sh command_update_functions.sh command_email_test.sh ) for allowed_command in "${allowed_commands_array[@]}" diff --git a/lgsm/functions/check_glibc.sh b/lgsm/functions/check_glibc.sh index a47e735aa..1a5d943a5 100644 --- a/lgsm/functions/check_glibc.sh +++ b/lgsm/functions/check_glibc.sh @@ -10,11 +10,13 @@ info_glibc.sh info_distro.sh 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: ${glibcrequired}" - echo " * glibc installed: ${glibcversion}" - export LD_LIBRARY_PATH=:"${libdir}" + if [ "${glibcfix}" == "yes" ]; then + if [ "${function_selfname}" != "command_install.sh" ]; then + fn_print_info_nl "Glibc fix: Using Glibc fix" + echo " * glibc required: ${glibcrequired}" + echo " * glibc installed: ${glibcversion}" + fix_glibc.sh + fi else fn_print_warn_nl "Glibc fix: No Glibc fix available!" echo -en "\n" @@ -22,6 +24,7 @@ if [ "$(printf '%s\n'${glibcrequired}'\n' ${glibcversion} | sort -V | head -n 1) echo " * glibc installed: ${glibcversion}" 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 diff --git a/lgsm/functions/fix_glibc.sh b/lgsm/functions/fix_glibc.sh index 160731afd..7fcbccc1f 100644 --- a/lgsm/functions/fix_glibc.sh +++ b/lgsm/functions/fix_glibc.sh @@ -22,4 +22,4 @@ do fi done -check_glibc.sh \ No newline at end of file +export LD_LIBRARY_PATH=:"${libdir}" \ No newline at end of file