[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

iso build broken



Hi Everyone,

I had to apply this patch to get my 2-kernel-debs ISO build to work;
otherwise the mv fails due to "file not found".  I don't know all of
what the intended changes of lh_binary_syslinux are supposed to do
(besides reducing code) so this may not be a real fix.  My kernels
files were already named {vmlinuz,initrd}[12].

Justin

--- /usr/bin/lh_binary_syslinux
+++ /usr/bin/lh_binary_syslinux	2007-10-30 18:28:37.000000000 -0400
@@ -103,8 +103,10 @@
       num=$(ls -1 ${KERNEL_PATH}|grep 'vmlinuz.\.img$'|wc -l)
       num=$(($num +1))
       # Note: ISOLINUX will not find the kernel if the name ends in ".img".
-      mv ${KERNEL_PATH}/${KERNEL} ${KERNEL_PATH}/vmlinuz${num}
-      mv ${KERNEL_PATH}/${INITRD} ${KERNEL_PATH}/initrd${num}.img
+      f=${KERNEL_PATH}/${KERNEL}
+      [ -e "$f" ] && mv -f "$f" ${KERNEL_PATH}/vmlinuz${num}
+      f=${KERNEL_PATH}/${INITRD}
+      [ -e "$f" ] && mv -f "$f" ${KERNEL_PATH}/initrd${num}.img
       KERNEL=vmlinuz${num}
       INITRD=initrd${num}.img
    fi




Reply to: