Commit 650e92bf authored by Michael Shigorin's avatar Michael Shigorin

build-vm, tar2fs: handle multiple kernels either

This was crucial for e2k rescue image supporting multiple CPU versions but can be useful elsewhere.
parent 4743947e
......@@ -227,10 +227,12 @@ esac
# NB: don't stick BOOTFS here, it has slightly different semantics
pushd $ROOTFS/boot
if [ -s .origver ]; then
read KVER < .origver
while read kver; do
chroot "$ROOTFS" make-initrd -k "$kver"
done < .origver
else
fatal "unable to deduce kernel version"
fi
[ -n "$KVER" ] || fatal "unable to deduce kernel version"
chroot "$ROOTFS" make-initrd -k "$KVER"
rm -f .origver
# ...target device too
......
......@@ -5,7 +5,6 @@
kver="$(rpm -qa 'kernel-image*' \
--qf '%{installtime} %{version}-%{name}-%{release}\n' \
| sort -n \
| tail -n 1 \
| cut -f 2 -d ' ' \
| sed 's/kernel-image-//')"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment