From b403cd99fa4f5f00c109d783524fc7d503e3fced Mon Sep 17 00:00:00 2001 From: Thomas Glanzmann Date: Fri, 4 Mar 2022 19:42:20 +0100 Subject: [PATCH 1/1] add a sanity check that checks if it runs as root --- m1di.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/m1di.pl b/m1di.pl index c46e7bb..1d86c68 100644 --- a/m1di.pl +++ b/m1di.pl @@ -38,6 +38,8 @@ find_identifier_before_free_space return ($identifier, $size); } +die "This script must be run as root\n" if ($< != 0); + ($identifier, $size) = find_identifier_before_free_space(); system("diskutil addPartition $identifier %EFI% LB 512MB"); -- 2.39.5