Skip to content

Commit

Permalink
abort if not running as root
Browse files Browse the repository at this point in the history
  • Loading branch information
fraenki committed Nov 28, 2023
1 parent c02d09b commit 9beb44a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ cleanup() {
rm -R ${TMP_DIR}/rw $IMAGE_MOUNT_DIR $ROOT_MOUNT_DIR
}

if [ $(id -u) != "0" ]; then
echo "ERROR: requires root privileges"
exit 1
fi

# handle arguments
while [ ${#} -gt 0 ]; do
case "${1}" in
Expand Down

0 comments on commit 9beb44a

Please sign in to comment.