|
|
|
@ -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
|
|
|
|
|