run as root!

This commit is contained in:
Gwenhael Le Moine 2016-07-13 07:13:40 +02:00
parent c339ac835c
commit 8fb7ddb92a

View file

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