1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-06-17 20:53:59 +02:00

add prereq check to prevent people from building openwrt as root

SVN-Revision: 4655
This commit is contained in:
Felix Fietkau 2006-08-24 18:49:51 +00:00
parent 9f816bf69d
commit 8aee0bee5c

View File

@ -8,6 +8,13 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/prereq.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 # Required for the toolchain
define Require/working-make define Require/working-make
echo 'all: test' > $(TMP_DIR)/check.mk echo 'all: test' > $(TMP_DIR)/check.mk