ソースを参照

Merge pull request #95 from metadave/dp_check_for_root

bail out if not root
Toyam Cox 8 年 前
コミット
b23f918d6f
1 ファイル変更6 行追加0 行削除
  1. 6 0
      installer.sh.in

+ 6 - 0
installer.sh.in

@@ -1382,6 +1382,12 @@ if [ ! -x /bin/dialog ]; then
     echo "ERROR: missing dialog command, exiting..."
     exit 1
 fi
+
+if [ "$(id -u)" != "0" ]; then
+   echo "void-installer must run as root" 1>&2
+   exit 1
+fi
+
 #
 # main()
 #