From 8aee0bee5c852207c97492f0262b0939e2c5ed4e Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 24 Aug 2006 18:49:51 +0000 Subject: [PATCH] add prereq check to prevent people from building openwrt as root SVN-Revision: 4655 --- openwrt/include/prereq-build.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/openwrt/include/prereq-build.mk b/openwrt/include/prereq-build.mk index a6de9b270aa7..e90c3157b050 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 -- 2.30.2