From: Felix Fietkau Date: Thu, 24 Aug 2006 18:49:51 +0000 (+0000) Subject: add prereq check to prevent people from building openwrt as root X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=63f45f213cc1fc87666117a4d9791f7af82ba4b2;p=openwrt%2Fsvn-archive%2Farchive.git add prereq check to prevent people from building openwrt as root SVN-Revision: 4655 --- diff --git a/openwrt/include/prereq-build.mk b/openwrt/include/prereq-build.mk index a6de9b270a..e90c3157b0 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