diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-10-07 07:42:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-07 07:42:58 +0200 |
commit | 3f16f939fb6ffcf6e65990d74827a7bdd4d10d6a (patch) | |
tree | 5f510afa6828775208bcc010323ab4297afa5e30 /data/live-build-config/hooks | |
parent | 262183c6a6974f8ef36f91549175927d27ad4f28 (diff) | |
parent | e7ac78de4947ebd5600c716832012585c006c41f (diff) | |
download | vyos-build-3f16f939fb6ffcf6e65990d74827a7bdd4d10d6a.tar.gz vyos-build-3f16f939fb6ffcf6e65990d74827a7bdd4d10d6a.zip |
Merge pull request #257 from dmbaturin/T3664-flavors
T3664: initial implementation of the build flavor system
Diffstat (limited to 'data/live-build-config/hooks')
-rwxr-xr-x | data/live-build-config/hooks/live/17-gen_initramfs.chroot | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/data/live-build-config/hooks/live/17-gen_initramfs.chroot b/data/live-build-config/hooks/live/17-gen_initramfs.chroot index 87b53bd6..8071c6b8 100755 --- a/data/live-build-config/hooks/live/17-gen_initramfs.chroot +++ b/data/live-build-config/hooks/live/17-gen_initramfs.chroot @@ -9,4 +9,15 @@ if [ -e /boot/initrd.img-* ]; then rm -f /boot/initrd.img-* fi -update-initramfs -c -k `ls /boot | grep vmlinuz- | sed 's/vmlinuz-//g'` +KERNEL_COUNT=$(find /boot/ -type f -name vmlinuz* | wc -l) +if [ "$KERNEL_COUNT" -gt 1 ]; then + echo "E: there is more than one kernel image file installed!" + echo "E: please make sure that kernel_version in data/defaults.toml is up to date" + echo "E: if your repository is up to date, then there is a bug" +fi + +kernel=`ls /boot | grep vmlinuz- | sed 's/vmlinuz-//g'` + +echo "I: Executing update-initramfs -c -k $kernel" + +update-initramfs -c -k $kernel |