check_glibc.sh 903 B

1234567891011121314151617181920212223242526272829
  1. #!/bin/bash
  2. # LGSM check_glibc.sh function
  3. # Author: Daniel Gibbs
  4. # Website: https://gameservermanagers.com
  5. lgsm_version="020116"
  6. # Description: Checks if server has correct glibc or has a fix available.
  7. info_glibc.sh
  8. info_distro.sh
  9. if [ "$(printf '%s\n'${glibcrequired}'\n' ${glibcversion} | sort -V | head -n 1)" != "${glibcrequired}" ]; then
  10. if [ "${glibcfix}" == "yes" ]; then
  11. if [ "${function_selfname}" != "command_install.sh" ]; then
  12. fn_print_info_nl "Glibc fix: Using Glibc fix"
  13. echo " * glibc required: ${glibcrequired}"
  14. echo " * glibc installed: ${glibcversion}"
  15. fix_glibc.sh
  16. fi
  17. else
  18. fn_print_warn_nl "Glibc fix: No Glibc fix available!"
  19. echo -en "\n"
  20. echo " * glibc required: ${glibcrequired}"
  21. echo " * glibc installed: ${glibcversion}"
  22. echo -en "\n"
  23. fn_print_infomation "The game server will probably not work. A distro upgrade is required!"
  24. sleep 5
  25. fi
  26. fi