main/postmarketos-mkinitfs: don't rm vmlinuz-* (MR 2501)

Adjust post-upgrade script to not remove vmlinuz-*. This causes problems
with devices using kernels from Alpine, where the kernel is not
installed to /boot/vmlinuz, as it is now the case in postmarketOS, but
e.g. in /boot/vmlinuz-rpi. The intention was to clean up files when
migrating from the old postmarketos-mkinitfs to the new one (>= 1.0.0).
However, the /boot/vmlinuz* files are managed by apk, so they should
already get removed.

Add -v, so it prints a message when removing a file from /boot.
This commit is contained in:
Oliver Smith 2021-09-08 23:30:38 +02:00
parent 380ef23882
commit e048839588
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
2 changed files with 3 additions and 3 deletions

View file

@ -2,7 +2,7 @@
# Co-Maintainer: Clayton Craft <clayton@craftyguy.net>
pkgname=postmarketos-mkinitfs
pkgver=1.0.2
pkgrel=0
pkgrel=1
pkgdesc="Tool to generate initramfs images for postmarketOS"
url="https://postmarketos.org"
depends="

View file

@ -5,8 +5,8 @@
# full than it needs to be, and things like copying files atomically in the new
# mkinitfs may not have enough space to do the atomic copy
echo "Cleaning up old boot files..."
for f in /boot/boot.img-* /boot/vmlinuz-* /boot/initramfs-*-extra* /boot/initramfs-*[!-extra]; do
[ -f "$f" ] && rm "$f"
for f in /boot/boot.img-* /boot/initramfs-*-extra* /boot/initramfs-*[!-extra]; do
[ -f "$f" ] && rm -v "$f"
done
exit 0