Skip to content
This repository has been archived by the owner on Oct 28, 2023. It is now read-only.

Commit

Permalink
iso: fix gpt bug
Browse files Browse the repository at this point in the history
  • Loading branch information
a1ive committed May 4, 2020
1 parent 26c60f2 commit 17c49c1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 23 deletions.
13 changes: 4 additions & 9 deletions boot/grubfm/rules/iso/e2b_test.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
source ${prefix}/func.sh;

probe --set=fs -f "${grubfm_device}";
if [ "${fs}" != "fat" -a "${fs}" != "exfat" -a "${fs}" != "ntfs" ];
if regexp 'hd[0-9]+,[msdos]*[1-3]' "${grubfm_device}";
then
return;
fi;
probe --set=partmap -p "${grubfm_device}";
if [ "${partmap}" != "msdos" ];
then
return;
set grubfm_test=1;
fi;

if regexp 'hd[0-9]+,[a-zA-Z]*[1-3]' "${grubfm_device}";
probe --set=partmap -p "${grubfm_device}";
if [ "${partmap}" = "msdos" -a "${grubfm_test}" = "1" ];
then
set grubfm_test=1;
else
Expand Down
25 changes: 11 additions & 14 deletions boot/grubfm/rules/iso/loop_test.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
source ${prefix}/func.sh;

if ! regexp '^hd.*' "${grubfm_device}";
if regexp '^hd.*' "${grubfm_device}";
then
set grubfm_test=0;
return;
fi;
loopback -d loop;
loopback loop "${grubfm_file}";
if [ -f (loop)/boot/grub/loopback.cfg ];
then
set grubfm_test=1;
else
set grubfm_test=0;
fi;

loopback -d loop;
loopback loop "${grubfm_file}";
if [ -f (loop)/boot/grub/loopback.cfg ];
then
set grubfm_test=1;
else
set grubfm_test=0;
source ${prefix}/rules/iso/loop_detect.sh;
loopback -d loop;
fi;

source ${prefix}/rules/iso/loop_detect.sh;
loopback -d loop;

0 comments on commit 17c49c1

Please sign in to comment.