"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "frontend/grub-mkrescue-sed.sh" between
libisoburn-1.5.0.tar.gz and libisoburn-1.5.2.tar.gz

About: libisoburn is a frontend for the libraries libburn and libisofs which enables creation and expansion of ISO-9660 filesystems on all media and file types supported by libburn. It implements the API and command interpreter of program xorriso, and installs this program as small dynamically linked binary. xorriso is suitable for incremental data backup and for production of bootable ISO 9660 images. A statically linked version is available as GNU xorriso.

grub-mkrescue-sed.sh  (libisoburn-1.5.0):grub-mkrescue-sed.sh  (libisoburn-1.5.2)
#!/bin/sh #!/bin/sh
# Copyright (C) 2015 - 2016 # Copyright (C) 2015 - 2019
# Thomas Schmitt <scdbackup@gmx.net>, libburnia-project.org # Thomas Schmitt <scdbackup@gmx.net>, libburnia-project.org
# Provided under BSD license: Use, modify, and distribute as you like. # Provided under BSD license: Use, modify, and distribute as you like.
echo >&2 echo >&2
echo "frontend/grub-mkrescue-sed.sh manipulating xorriso arguments" >&2 echo "frontend/grub-mkrescue-sed.sh manipulating xorriso arguments" >&2
echo >&2 echo >&2
# This script may be handed by its absolute path to grub-mkrescue # This script may be handed by its absolute path to grub-mkrescue
# via option --xorriso= . E.g. # via option --xorriso= . E.g.
# #
skipping to change at line 120 skipping to change at line 120
else else
xorriso="xorriso" xorriso="xorriso"
fi fi
fi fi
# MKRESCUE_SED_XORRISO_ARGS will be used as first arguments of the xorriso run. # MKRESCUE_SED_XORRISO_ARGS will be used as first arguments of the xorriso run.
# (Trailing xorriso arguments may be simply added to the grub-mkrescue # (Trailing xorriso arguments may be simply added to the grub-mkrescue
# command line.) # command line.)
# Each argument must be a single word. No whitespace. No quotation marks. # Each argument must be a single word. No whitespace. No quotation marks.
# "yes" overwrites the MBR partition table area in the EFI boot image by zeros.
# Some EFI implementations get stuck when seeing in the EFI partition a
# partition table entry which begins at LBA 0.
# "extra" not only zeros the partition table but also the MBR signature.
efi_zero_inner_pt=no
if test -n "$MKRESCUE_SED_IN_EFI_NO_PT"
then
efi_zero_inner_pt="$MKRESCUE_SED_IN_EFI_NO_PT"
fi
# #
# Do the work # Do the work
# #
# grub-mkrescue inquires features by running these arguments # grub-mkrescue inquires features by running these arguments
if test "$*" = "-as mkisofs -help" if test "$*" = "-as mkisofs -help"
then then
"$xorriso" "$@" "$xorriso" "$@"
exit $? exit $?
fi fi
skipping to change at line 185 skipping to change at line 195
fi fi
fi fi
done done
if test x"$debug" = xextra if test x"$debug" = xextra
then then
# Show files on disk # Show files on disk
find "$dir" find "$dir"
fi fi
if test "$efi_zero_inner_pt" = yes -o "$efi_zero_inner_pt" = extra
then
did_dd=0
if test -e "$dir"/efi.img
then
# Look for 0x55 0xAA in bytes 510 and 511
magic=$(dd bs=1 skip=510 count=2 if="$dir"/efi.img 2>/dev/null | \
od -c | head -1 | awk '{print $2 " " $3}')
if test "$magic" = "U 252"
then
echo "Performing actions for MKRESCUE_SED_IN_EFI_NO_PT=$efi_zero_inner_pt"
>&2
dd if=/dev/zero bs=1 seek=446 count=64 conv=notrunc of="$dir"/efi.img
did_dd=1
if test "$efi_zero_inner_pt" = extra
then
dd if=/dev/zero bs=1 seek=510 count=2 conv=notrunc of="$dir"/efi.img
fi
echo >&2
fi
fi
if test "$did_dd" = 0
then
echo >&2
echo "$0 : NOTE : No EFI image found or no MBR signature in it." >&2
echo "$0 : NOTE : Will not obey MKRESCUE_SED_IN_EFI_NO_PT=$efi_zero_inner_pt
" >&2
echo >&2
fi
fi
efi_tmp_name= efi_tmp_name=
if test x"$mode" = xmjg \
-o x"$mode" = xmbr_only \
-o x"$mode" = xgpt_appended \
-o x"$mode" = xmbr_hfs
then
# Move EFI partition image file out of the "$dir" tree, i.e. out of the ISO
efi_tmp_name=grub-mkrescue-sed-efi-img.$$
if test -e "$dir"/efi.img
then
mv "$dir"/efi.img /tmp/$efi_tmp_name
elif test -e /tmp/$efi_tmp_name
then
rm /tmp/$efi_tmp_name
fi
fi
if test x"$mode" = xmjg if test x"$mode" = xmjg
then then
# Exchange arguments for the experimental GRUB2 mjg layout # Exchange arguments for the experimental GRUB2 mjg layout
efi_tmp_name=grub-mkrescue-sed-efi-img.$$
mv "$dir"/efi.img /tmp/$efi_tmp_name
x=$(echo " $*" | sed \ x=$(echo " $*" | sed \
-e "s/-efi-boot-part --efi-boot-image/-no-pad -append_partition $partno 0xef \/tmp\/$efi_tmp_name/" \ -e "s/-efi-boot-part --efi-boot-image/-no-pad -append_partition $partno 0xef \/tmp\/$efi_tmp_name/" \
-e "s/--efi-boot efi\.img/-eltorito-alt-boot -e --interval:appended_partitio n_${partno}:all:: -no-emul-boot -isohybrid-gpt-basdat/" \ -e "s/--efi-boot efi\.img/-eltorito-alt-boot -e --interval:appended_partitio n_${partno}:all:: -no-emul-boot -isohybrid-gpt-basdat/" \
-e "s/--protective-msdos-label/$protective -part_like_isohybrid/" \ -e "s/--protective-msdos-label/$protective -part_like_isohybrid/" \
) )
elif test x"$mode" = xmjg_copy elif test x"$mode" = xmjg_copy
then then
# Exchange arguments for the experimental GRUB2 mjg layout # Exchange arguments for the experimental GRUB2 mjg layout
x=$(echo " $*" | sed \ x=$(echo " $*" | sed \
-e "s/-efi-boot-part --efi-boot-image/-no-pad -append_partition $partno 0xef \/tmp\/$(basename "$dir")\/efi.img/" \ -e "s/-efi-boot-part --efi-boot-image/-no-pad -append_partition $partno 0xef \/tmp\/$(basename "$dir")\/efi.img/" \
-e "s/--efi-boot efi\.img/-eltorito-alt-boot -e efi.img -no-emul-boot -isohy brid-gpt-basdat/" \ -e "s/--efi-boot efi\.img/-eltorito-alt-boot -e efi.img -no-emul-boot -isohy brid-gpt-basdat/" \
-e "s/--protective-msdos-label/$protective -part_like_isohybrid/" \ -e "s/--protective-msdos-label/$protective -part_like_isohybrid/" \
) )
elif test x"$mode" = xmbr_only elif test x"$mode" = xmbr_only
then then
# Exchange arguments for no-HFS MBR-only layout # Exchange arguments for no-HFS MBR-only layout
efi_tmp_name=grub-mkrescue-sed-efi-img.$$
mv "$dir"/efi.img /tmp/$efi_tmp_name
x=$(echo " $*" | sed \ x=$(echo " $*" | sed \
-e "s/-efi-boot-part --efi-boot-image/$iso_mbr_part_type -no-pad -append_par tition 2 0xef \/tmp\/$efi_tmp_name/" \ -e "s/-efi-boot-part --efi-boot-image/$iso_mbr_part_type -no-pad -append_par tition 2 0xef \/tmp\/$efi_tmp_name/" \
-e "s/--efi-boot efi\.img/-eltorito-alt-boot -e --interval:appended_partitio n_2:all:: -no-emul-boot/" \ -e "s/--efi-boot efi\.img/-eltorito-alt-boot -e --interval:appended_partitio n_2:all:: -no-emul-boot/" \
-e "s/-hfsplus .*CoreServices\/boot.efi//" \ -e "s/-hfsplus .*CoreServices\/boot.efi//" \
-e "s/--protective-msdos-label/$protective/" \ -e "s/--protective-msdos-label/$protective/" \
) )
elif test x"$mode" = xmbr_only_copy elif test x"$mode" = xmbr_only_copy
then then
# Exchange arguments for no-HFS MBR-only layout # Exchange arguments for no-HFS MBR-only layout
x=$(echo " $*" | sed \ x=$(echo " $*" | sed \
-e "s/-efi-boot-part --efi-boot-image/$iso_mbr_part_type -no-pad -append_par tition 2 0xef \/tmp\/$(basename "$dir")\/efi.img/" \ -e "s/-efi-boot-part --efi-boot-image/$iso_mbr_part_type -no-pad -append_par tition 2 0xef \/tmp\/$(basename "$dir")\/efi.img/" \
-e "s/-hfsplus .*CoreServices\/boot.efi//" \ -e "s/-hfsplus .*CoreServices\/boot.efi//" \
-e "s/--protective-msdos-label/$protective/" \ -e "s/--protective-msdos-label/$protective/" \
) )
elif test x"$mode" = xmbr_hfs elif test x"$mode" = xmbr_hfs
then then
# Exchange arguments for MBR and HFS+ layout # Exchange arguments for MBR and HFS+ layout
efi_tmp_name=grub-mkrescue-sed-efi-img.$$
mv "$dir"/efi.img /tmp/$efi_tmp_name
x=$(echo " $*" | sed \ x=$(echo " $*" | sed \
-e "s/-efi-boot-part --efi-boot-image/$iso_mbr_part_type -no-pad -append_par tition 2 0xef \/tmp\/$efi_tmp_name/" \ -e "s/-efi-boot-part --efi-boot-image/$iso_mbr_part_type -no-pad -append_par tition 2 0xef \/tmp\/$efi_tmp_name/" \
-e "s/--efi-boot efi\.img/-eltorito-alt-boot -e --interval:appended_partitio n_2:all:: -no-emul-boot/" \ -e "s/--efi-boot efi\.img/-eltorito-alt-boot -e --interval:appended_partitio n_2:all:: -no-emul-boot/" \
-e "s/--protective-msdos-label/$protective/" \ -e "s/--protective-msdos-label/$protective/" \
) )
elif test x"$mode" = xmbr_hfs_copy elif test x"$mode" = xmbr_hfs_copy
then then
# Exchange arguments for MBR and HFS+ layout # Exchange arguments for MBR and HFS+ layout
x=$(echo " $*" | sed \ x=$(echo " $*" | sed \
-e "s/-efi-boot-part --efi-boot-image/$iso_mbr_part_type -no-pad -append_par tition 2 0xef \/tmp\/$(basename "$dir")\/efi.img/" \ -e "s/-efi-boot-part --efi-boot-image/$iso_mbr_part_type -no-pad -append_par tition 2 0xef \/tmp\/$(basename "$dir")\/efi.img/" \
-e "s/--protective-msdos-label/$protective/" \ -e "s/--protective-msdos-label/$protective/" \
) )
elif test x"$mode" = xgpt_appended elif test x"$mode" = xgpt_appended
then then
# Exchange arguments for no-HFS MBR-only layout # Exchange arguments for no-HFS MBR-only layout
efi_tmp_name=grub-mkrescue-sed-efi-img.$$
mv "$dir"/efi.img /tmp/$efi_tmp_name
x=$(echo " $*" | sed \ x=$(echo " $*" | sed \
-e "s/-efi-boot-part --efi-boot-image/-no-pad -append_partition 2 0xef \/tmp \/$efi_tmp_name -appended_part_as_gpt -partition_offset 16/" \ -e "s/-efi-boot-part --efi-boot-image/-no-pad -append_partition 2 0xef \/tmp \/$efi_tmp_name -appended_part_as_gpt -partition_offset 16/" \
-e "s/--efi-boot efi\.img/-eltorito-alt-boot -e --interval:appended_partitio n_2:all:: -no-emul-boot/" \ -e "s/--efi-boot efi\.img/-eltorito-alt-boot -e --interval:appended_partitio n_2:all:: -no-emul-boot/" \
-e "s/-hfsplus .*CoreServices\/boot.efi//" \ -e "s/-hfsplus .*CoreServices\/boot.efi//" \
) )
elif test x"$mode" = xgpt_appended_copy elif test x"$mode" = xgpt_appended_copy
then then
# Exchange arguments for no-HFS MBR-only layout # Exchange arguments for no-HFS MBR-only layout
x=$(echo " $*" | sed \ x=$(echo " $*" | sed \
 End of changes. 8 change blocks. 
9 lines changed or deleted 58 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)