mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-07-06 14:31:30 +00:00
Determine kernel image/initrd version exactly, using apt data.
This commit is contained in:
parent
3b6cb7e19e
commit
30430fc7d8
6
debian/changelog
vendored
6
debian/changelog
vendored
@ -1,3 +1,9 @@
|
|||||||
|
livecd-rootfs (2.657) UNRELEASED; urgency=medium
|
||||||
|
|
||||||
|
* Determine kernel image/initrd version exactly, using apt data.
|
||||||
|
|
||||||
|
-- Dimitri John Ledkov <xnox@ubuntu.com> Wed, 01 Apr 2020 11:13:42 +0100
|
||||||
|
|
||||||
livecd-rootfs (2.656) focal; urgency=medium
|
livecd-rootfs (2.656) focal; urgency=medium
|
||||||
|
|
||||||
[ David Krauser ]
|
[ David Krauser ]
|
||||||
|
@ -819,33 +819,8 @@ for FLAVOUR in $LB_LINUX_FLAVOURS; do
|
|||||||
if [ -z "$LB_LINUX_FLAVOURS" ] || [ "$LB_LINUX_FLAVOURS" = "none" ]; then
|
if [ -z "$LB_LINUX_FLAVOURS" ] || [ "$LB_LINUX_FLAVOURS" = "none" ]; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
case $FLAVOUR in
|
KVERS=$(Chroot chroot apt show linux-image-$FLAVOUR 2>/dev/null | sed -n 's/^Depends:.* linux-image-\([a-z0-9.-]*\).*/\1/p')
|
||||||
virtual)
|
|
||||||
FLAVOUR="generic"
|
|
||||||
;;
|
|
||||||
oem-*)
|
|
||||||
FLAVOUR="oem"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
KVERS="$( (cd "binary/$INITFS"; ls vmlinu?-* 2>/dev/null || true) | (fgrep -v .efi || true) | sed -n "s/^vmlinu.-\\([^-]*-[^-]*-$FLAVOUR\\)$/\\1/p" )"
|
|
||||||
if [ -z "$KVERS" ]; then
|
|
||||||
if [ -e "binary/$INITFS/vmlinuz" ]; then
|
|
||||||
# already renamed by ubuntu-defaults-image
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
echo "No kernel output for $FLAVOUR!" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
NUMKVERS="$(set -- $KVERS; echo $#)"
|
|
||||||
if [ "$NUMKVERS" -gt 1 ]; then
|
|
||||||
echo "Cannot handle more than one kernel for $FLAVOUR ($KVERS)!" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
ln "binary/$INITFS/"vmlinu?-"$KVERS" "$PREFIX.kernel-$FLAVOUR"
|
ln "binary/$INITFS/"vmlinu?-"$KVERS" "$PREFIX.kernel-$FLAVOUR"
|
||||||
if [ -e "binary/$INITFS/"vmlinu?-"$KVERS.efi.signed" ]; then
|
|
||||||
ln "binary/$INITFS/"vmlinu?-"$KVERS.efi.signed" "$PREFIX.kernel-$FLAVOUR.efi.signed"
|
|
||||||
chmod 644 "$PREFIX.kernel-$FLAVOUR.efi.signed"
|
|
||||||
fi
|
|
||||||
chmod 644 "$PREFIX.kernel-$FLAVOUR"
|
chmod 644 "$PREFIX.kernel-$FLAVOUR"
|
||||||
if [ -e "binary/$INITFS/initrd.img-$KVERS" ]; then
|
if [ -e "binary/$INITFS/initrd.img-$KVERS" ]; then
|
||||||
ln "binary/$INITFS/initrd.img-$KVERS" "$PREFIX.initrd-$FLAVOUR"
|
ln "binary/$INITFS/initrd.img-$KVERS" "$PREFIX.initrd-$FLAVOUR"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user