瀏覽代碼

rootcheck

Paul Klumpp 12 年之前
父節點
當前提交
9616314bc3
共有 1 個文件被更改,包括 8 次插入0 次删除
  1. 8 0
      q2compile/make_and_put_all.sh

+ 8 - 0
q2compile/make_and_put_all.sh

@@ -5,6 +5,14 @@ cwd=$(pwd)
 q2srv=$cwd/../q2srv/
 cd $cwd
 
+
+if [ "${USER}" == "root" ]; then
+	echo "Nono! Don't run this as root! Don't!"
+	echo "Switch to a normal user!"
+	echo
+	exit
+fi
+
 function checkinstalled {
 	if [ "$1" != "" ]; then
 		woot=$(which "$1" 2> /dev/null)