From 549232f607d743ba069c435fa56cae36ede0c10b Mon Sep 17 00:00:00 2001 From: Balint Reczey Date: Wed, 11 Oct 2017 01:57:03 +0200 Subject: [PATCH] Clean up dangling /boot/initrd.img symlink when needed --- live-build/ubuntu-cpc/hooks/999-cpc-fixes.chroot | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/live-build/ubuntu-cpc/hooks/999-cpc-fixes.chroot b/live-build/ubuntu-cpc/hooks/999-cpc-fixes.chroot index e59e38c8..8b22fc8e 100755 --- a/live-build/ubuntu-cpc/hooks/999-cpc-fixes.chroot +++ b/live-build/ubuntu-cpc/hooks/999-cpc-fixes.chroot @@ -130,6 +130,11 @@ if [ -f "${rootd}/etc/overlayroot.conf" ] && } > "${rootd}/etc/overlayroot.local.conf" fi +# previous steps may have left a dangling symlink here with +# SUBPROJECT=minimized and that breaks lb_chroot_hacks step +if [ -L "${rootd}/boot/initrd.img" ] && [ ! -e "${rootd}/boot/initrd.img" ]; then + rm "${rootd}/boot/initrd.img" +fi #### END COMMON ARCH FUNCTIONS