From 7b0501ae2a512c5382adce02a51e5bfea112cdb5 Mon Sep 17 00:00:00 2001 From: Michael Shigorin Date: Mon, 2 Feb 2015 14:55:36 +0300 Subject: [PATCH] tar2fs: fix check for lilo binary The check introduced by commit d7689f30 while rewriting tar2vm (which presumed x86) was subtly broken: it checked for *host* binary before preparing *chroot* configuration file for it. Wonder how many build servers run lilo over here that this BUG has managed to evade attention for almost two years... --- bin/tar2fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/tar2fs b/bin/tar2fs index f1911bf6..d4232e5c 100755 --- a/bin/tar2fs +++ b/bin/tar2fs @@ -209,7 +209,7 @@ chroot "$ROOTFS" make-initrd -k "$KERNEL" # ...target device too sed -i "s,$LOOPROOT,$ROOTDEV," "$ROOTFS/etc/fstab" -if [ -x /sbin/lilo ]; then +if [ -x "$ROOTFS"/sbin/lilo ]; then # configure and install bootloader REGEXP='^Disk .*: ([0-9]+) cylinders, ([0-9]+) heads, ([0-9]+) sectors/track*$' set -- $(sfdisk -l "$LOOPDEV" | grep -E "$REGEXP" | sed -r "s@$REGEXP@\1 \2 \3@")