summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xhelpers/lh_binary_grub7
-rwxr-xr-xhelpers/lh_binary_syslinux7
2 files changed, 14 insertions, 0 deletions
diff --git a/helpers/lh_binary_grub b/helpers/lh_binary_grub
index 408b48de4..4b99b260e 100755
--- a/helpers/lh_binary_grub
+++ b/helpers/lh_binary_grub
@@ -226,6 +226,13 @@ then
INITRD_GI="install/gtk/initrd.gz"
APPEND_GI="video=vesa:ywrap,mtrr vga=788"
+ if cmp -s ${VMLINUZ_DI} ${VMLINUZ_GI}
+ then
+ # Kernels are identical; we can save space by removing one of them.
+ rm ${VMLINUZ_GI}
+ VMLINUZ_GI="${VMLINUZ_DI}"
+ fi
+
Grub_install_entry "install" "${VMLINUZ_DI}" "${INITRD_DI}" "${APPEND_DI}"
Grub_install_entry "installgui" "${VMLINUZ_GI}" "${INITRD_GI}" "${APPEND_GI}"
Grub_install_entry "expert" "${VMLINUZ_DI}" "${INITRD_DI}" "priority=low ${APPEND_DI}"
diff --git a/helpers/lh_binary_syslinux b/helpers/lh_binary_syslinux
index f0338ae5f..a6e318322 100755
--- a/helpers/lh_binary_syslinux
+++ b/helpers/lh_binary_syslinux
@@ -522,6 +522,13 @@ then
INITRD_GI="gtk/initrd.gz"
APPEND_GI="video=vesa:ywrap,mtrr vga=788"
+ if cmp -s ${VMLINUZ_DI} ${VMLINUZ_GI}
+ then
+ # Kernels are identical; we can save space by removing one of them.
+ rm ${VMLINUZ_GI}
+ VMLINUZ_GI="${VMLINUZ_DI}"
+ fi
+
Syslinux_install_entry "Text" "${VMLINUZ_DI}" "${INITRD_DI}" "${APPEND_DI}"
Syslinux_install_entry "GUI" "${VMLINUZ_GI}" "${INITRD_GI}" "${APPEND_GI}"
fi