diff --git a/grub-1.99-Fix-tests-of-zeroed-partition.patch b/grub-1.99-Fix-tests-of-zeroed-partition.patch index a57711c..343c378 100644 --- a/grub-1.99-Fix-tests-of-zeroed-partition.patch +++ b/grub-1.99-Fix-tests-of-zeroed-partition.patch @@ -16,7 +16,7 @@ index 9c1d133..e8638af 100644 fi - if [ "$(file -s "${install_device}" -b | awk '{ print $1 }')" = ELF ] || [ $(cmp /dev/zero "${install_device}" &>/dev/null) ]; then -+ if [ "$(file -s "${install_device}" -b | awk '{ print $1 }')" != ELF ] && ( cmp -s -n $(blockdev --getsize64 ${install_device}) /dev/zero "${install_device}" &>/dev/null ); then ++ if [ "$(file -s "${install_device}" -b | awk '{ print $1 }')" = ELF ] || (cmp -s -n $(blockdev --getsize64 ${install_device}) /dev/zero "${install_device}"); then # Change boot device to the harddisk root boot_device="$ofpath" dd if="${grubdir}/${grub_modinfo_target_cpu}-$grub_modinfo_platform/core.${imgext}" of="${install_device}" status=noxfer || { diff --git a/grub-2.00~beta4-add-support-for-PowerMac-HFS-partitions.patch b/grub-2.00~beta4-add-support-for-PowerMac-HFS-partitions.patch index 9ad7dde..4cad3e7 100644 --- a/grub-2.00~beta4-add-support-for-PowerMac-HFS-partitions.patch +++ b/grub-2.00~beta4-add-support-for-PowerMac-HFS-partitions.patch @@ -23,7 +23,7 @@ index 26be9d9..f1f9bae 100644 - fi - + if [ "$("${grub_probe}" -m "${device_map}" -d "${install_device}" -t msdos_parttype)" = "41" ]; then - if [ "$(file -s "${install_device}" -b | awk '{ print $1 }')" != ELF ] && ( cmp -s -n $(blockdev --getsize64 ${install_device}) /dev/zero "${install_device}" &>/dev/null ); then + if [ "$(file -s "${install_device}" -b | awk '{ print $1 }')" = ELF ] || (cmp -s -n $(blockdev --getsize64 ${install_device}) /dev/zero "${install_device}"); then - # Change boot device to the harddisk root - boot_device="$ofpath" - dd if="${grubdir}/${grub_modinfo_target_cpu}-$grub_modinfo_platform/core.${imgext}" of="${install_device}" status=noxfer || {