summaryrefslogtreecommitdiff
path: root/openwrt/include
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2006-08-24 18:49:51 +0000
committerFelix Fietkau <nbd@openwrt.org>2006-08-24 18:49:51 +0000
commit8aee0bee5c852207c97492f0262b0939e2c5ed4e (patch)
tree6600ab1b514d9f3b163d69bd6f8657370131046b /openwrt/include
parent9f816bf69d4d1c4f43c299c06563af60caa383a7 (diff)
downloadmtk-20170518-8aee0bee5c852207c97492f0262b0939e2c5ed4e.zip
mtk-20170518-8aee0bee5c852207c97492f0262b0939e2c5ed4e.tar.gz
mtk-20170518-8aee0bee5c852207c97492f0262b0939e2c5ed4e.tar.bz2
add prereq check to prevent people from building openwrt as root
SVN-Revision: 4655
Diffstat (limited to 'openwrt/include')
-rw-r--r--openwrt/include/prereq-build.mk7
1 files changed, 7 insertions, 0 deletions
diff --git a/openwrt/include/prereq-build.mk b/openwrt/include/prereq-build.mk
index a6de9b2..e90c315 100644
--- a/openwrt/include/prereq-build.mk
+++ b/openwrt/include/prereq-build.mk
@@ -8,6 +8,13 @@
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/prereq.mk
+define Require/non-root
+ [ "$$(shell whoami)" != "root" ]
+endef
+$(eval $(call Require,non-root, \
+ Building OpenWrt as root is not supported! \
+))
+
# Required for the toolchain
define Require/working-make
echo 'all: test' > $(TMP_DIR)/check.mk