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

Commit

Permalink
iso: unmap cd
Browse files Browse the repository at this point in the history
  • Loading branch information
a1ive committed May 12, 2020
1 parent e4ca250 commit 6f5be83
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions boot/grubfm/func.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ function to_g4d_path {
lua ${prefix}/g4d_path.lua;
}

function unmap_cd {
for dev in (cd*);
do
if [ -e ${dev} ];
then
map -x ${dev};
fi;
done;
}

regexp --set=1:grubfm_path '(/.*)$' "${grubfm_file}";
regexp --set=1:grubfm_dir '^(.*/).*$' "${grubfm_path}";
regexp --set=1:grubfm_device '^\(([0-9a-zA-Z,]+)\)/.*' "${grubfm_file}";
Expand Down
1 change: 1 addition & 0 deletions boot/grubfm/rules/iso/e2b.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ then
partnew --type=0x00 --file="${grubfm_file}" "${grubfm_disk}" 4;
if [ "$grub_platform" = "efi" ];
then
unmap_cd;
map "${grubfm_file}";
elif [ "$grub_platform" = "pc" ];
then
Expand Down
1 change: 1 addition & 0 deletions boot/grubfm/rules/iso/map.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ source ${prefix}/func.sh;

if [ "$grub_platform" = "efi" ];
then
unmap_cd;
map "${grubfm_file}";
elif [ "$grub_platform" = "pc" ];
then
Expand Down

0 comments on commit 6f5be83

Please sign in to comment.