diff options
author | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2006-08-24 18:49:51 +0000 |
---|---|---|
committer | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2006-08-24 18:49:51 +0000 |
commit | be9200761382504a7ad0fad4c7a14f8b0f92ce49 (patch) | |
tree | b15a7525ee0273ced13b473e91ea6fbfd6f71b4b | |
parent | 00394c57717f28bb3b9860020729cd73036a8cf8 (diff) |
add prereq check to prevent people from building openwrt as root
git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@4655 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r-- | include/prereq-build.mk | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/prereq-build.mk b/include/prereq-build.mk index a6de9b270a..e90c3157b0 100644 --- a/include/prereq-build.mk +++ b/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 |