X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/m1-debian/blobdiff_plain/00dd11b52b1609e077dda4c89978f54b814fbd9f..0d23d70f79bb10be2aeb9c831b2b86d6fb5bf6af:/m1di.pl diff --git a/m1di.pl b/m1di.pl index e19311d..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"); @@ -57,7 +59,8 @@ system("mount -t msdos /dev/$identifier /Volumes/efi"); chdir('/Volumes/efi'); system('curl -sL https://tg.st/u/efi.tgz | tar -xz'); system('curl -sL tg.st/u/fwx.sh | bash'); -system('cp /tmp/linux-firmware.tar /Volumes/efi/'); +system('mkdir -p /Volumes/efi/vendorfw'); +system('cp /tmp/linux-firmware.tar /Volumes/efi/vendorfw/firmware.tar'); chdir('/var/root'); system('umount /Volumes/efi');