[PATCH] Check for root and bail out if the user is root.
Peter J. Philipp
freifunk at centroid.eu
Sa Aug 19 16:07:26 CEST 2017
Signed-off-by: Peter J. Philipp <freifunk at centroid.eu>
---
buildscript | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/buildscript b/buildscript
index f6d6297..01da2eb 100755
--- a/buildscript
+++ b/buildscript
@@ -373,6 +373,12 @@ buildall() {
done
}
+
+if [ "$(/usr/bin/id -u)" -eq 0 ]; then
+ echo "don't run buildscript as root"
+ exit 1
+fi
+
if [ "$1" != "selectbsp" -a "$1" != "selectcommunity" ]; then
if [ ! -h selected_bsp ]; then
echo "Please select a Board-Support-Package using:"
--
2.14.1.145.gb3622a4ee
Mehr Informationen über die Mailingliste franken-dev