Преглед изворни кода

added error check for touch consolelog

Daniel Gibbs пре 9 година
родитељ
комит
26269a04a8
1 измењених фајлова са 7 додато и 1 уклоњено
  1. 7 1
      lgsm/functions/install_logs.sh

+ 7 - 1
lgsm/functions/install_logs.sh

@@ -50,8 +50,14 @@ if [ -n "${consolelogdir}" ]; then
 	else
 		fn_print_ok_eol_nl
 	fi
-	echo -ne "creating console log:"
+	echo -ne "creating console log: ${consolelog}..."
 	touch "${consolelog}"
+	if [ $? -ne 0 ]; then
+	fn_print_fail_eol_nl
+	core_exit.sh
+	else
+		fn_print_ok_eol_nl
+	fi
 fi
 
 # Create Game logs