build-vm, tar2fs: handle multiple kernels either
This was crucial for e2k rescue image supporting multiple CPU versions but can be useful elsewhere.
This commit is contained in:
parent
4743947ea5
commit
650e92bf7f
@ -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-//')"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user