[PATCH] Check for root and bail out if the user is root.

Tim Niemeyer tim at tn-x.org
Sa Aug 19 16:13:38 CEST 2017


Hi

Schaut gut aus. Danke.

Am Samstag, den 19.08.2017, 16:07 +0200 schrieb Peter J. Philipp:
> 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
>  }
>  
> +
Beim applien vllt diese überflüssige Leerstelle entfernen.

Reviewed-by: Tim Niemeyer <tim at tn-x.org>

Tim

> +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
> 

-------------- nächster Teil --------------
Ein Dateianhang mit Binärdaten wurde abgetrennt...
Dateiname   : signature.asc
Dateityp    : application/pgp-signature
Dateigröße  : 473 bytes
Beschreibung: This is a digitally signed message part
URL         : <http://lists.freifunk.net/pipermail/franken-dev-freifunk.net/attachments/20170819/1da5e9aa/attachment.sig>


Mehr Informationen über die Mailingliste franken-dev