From 8fb7ddb92a54cdfb2f89e70e7b6d0dd23a050334 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Wed, 13 Jul 2016 07:13:40 +0200 Subject: [PATCH] run as root! --- make_usd_card.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/make_usd_card.sh b/make_usd_card.sh index 1fbbd2c..8252d21 100755 --- a/make_usd_card.sh +++ b/make_usd_card.sh @@ -11,6 +11,8 @@ SD_MOUNT_POINT=$2 [ "x$1" == "x" ] && display_usage && exit [ "x$2" == "x" ] && display_usage && exit +[ ! "x$UID" == "x0"] && echo "run as root" && exit + if $(df | grep /$ | grep -q "^$SD_DEV"); then echo "Target and current system device are the same. Can't do that!" exit