3
0
mirror of https://git.launchpad.net/livecd-rootfs synced 2025-04-21 16:11:24 +00:00

Merge remote-tracking branch 'simpoir/lp2037338_var_scoping' into ubuntu/master

This commit is contained in:
Michael Hudson-Doyle 2023-09-26 15:10:46 +13:00
commit e349c38b77

@ -767,9 +767,10 @@ snap_preseed() {
snap_validate_seed() {
local CHROOT_ROOT=$1
local kern_major_min=undefined
if [ -e ${CHROOT_ROOT}/boot/vmlinuz ]; then
local kern_major_min=$(readlink --canonicalize --no-newline ${CHROOT_ROOT}/boot/vmlinuz | grep --extended-regexp --only-matching --max-count 1 '[0-9]+\.[0-9]+')
kern_major_min=$(readlink --canonicalize --no-newline ${CHROOT_ROOT}/boot/vmlinuz | grep --extended-regexp --only-matching --max-count 1 '[0-9]+\.[0-9]+')
if [ -d /usr/share/livecd-rootfs/live-build/apparmor/${kern_major_min} ]; then
# if an Ubuntu version has different kernel apparmor features between LTS and HWE kernels
# a snap pre-seeding issue can occur, where the incorrect apparmor features are reported