diff options
author | Chris Lamb <chris@chris-lamb.co.uk> | 2008-07-29 00:48:31 +0100 |
---|---|---|
committer | Chris Lamb <chris@chris-lamb.co.uk> | 2008-07-29 00:48:31 +0100 |
commit | 3199a409fade444b1aecc2c6e3a87b8bd54429e0 (patch) | |
tree | 1d5f80a13cf00ff1d2e5981ac3b3eb5b089c28a8 | |
parent | 2435bee4acd2dc3a7980b8ec67326dbb622fc2ff (diff) | |
download | vyos-live-build-3199a409fade444b1aecc2c6e3a87b8bd54429e0.tar.gz vyos-live-build-3199a409fade444b1aecc2c6e3a87b8bd54429e0.zip |
Don't duplicate gtk and non-gtk kernels if they are identical.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
-rwxr-xr-x | helpers/lh_binary_grub | 7 | ||||
-rwxr-xr-x | helpers/lh_binary_syslinux | 7 |
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 |