فهرست منبع

glibcfix shouls run with correct functions

Daniel Gibbs 10 سال پیش
والد
کامیت
9161b0078d
3فایلهای تغییر یافته به همراه16 افزوده شده و 9 حذف شده
  1. 7 3
      lgsm/functions/check.sh
  2. 8 5
      lgsm/functions/check_glibc.sh
  3. 1 1
      lgsm/functions/fix_glibc.sh

+ 7 - 3
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[@]}"

+ 8 - 5
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

+ 1 - 1
lgsm/functions/fix_glibc.sh

@@ -22,4 +22,4 @@ do
 	fi	
 done
 
-check_glibc.sh
+export LD_LIBRARY_PATH=:"${libdir}"