mirror of
https://github.com/immortalwrt/immortalwrt.git
synced 2025-08-11 06:11:53 +08:00
add prereq check to prevent people from building openwrt as root
SVN-Revision: 4655
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user