check_glibc.sh 820 B

123456789101112131415161718192021222324
  1. #!/bin/bash
  2. # LinuxGSM check_glibc.sh function
  3. # Author: Daniel Gibbs
  4. # Website: https://linuxgsm.com
  5. # Description: Checks if the server has the correct Glibc version or a fix available.
  6. local commandname="CHECK"
  7. info_glibc.sh
  8. info_distro.sh
  9. if [ "${glibcrequired}" == "NOT REQUIRED" ]; then
  10. :
  11. elif [ "$(printf '%s\n'${glibcrequired}'\n' "${glibcversion}" | sort -V | head -n 1)" != "${glibcrequired}" ]||[ "${glibcrequired}" == "UNKNOWN" ]; then
  12. fn_print_dots "Glibc"
  13. sleep 0.5
  14. fn_print_error_nl "glibc: ${red}glibc distro version ${glibcversion} too old${default}"
  15. echo -en "\n"
  16. echo -e " * glibc required: ${glibcrequired}"
  17. echo -e " * glibc installed: ${red}${glibcversion}${default}"
  18. echo -en "\n"
  19. fn_print_information "The game server will probably not work. A distro upgrade is required!"
  20. sleep 2
  21. fi