1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-25 12:15:32 +03:00
aports/community/booster/booster.trigger
Sören Tempel c4da8d5e9f community/booster: move from testing
I've been using Booster as the default initramfs on all my Alpine-based
desktop systems and haven't noticed any issue so far. As such, it should
be fine to move it to community/ and thereby support an alternative
initramfs in the upcoming 3.17 release.
2022-09-10 19:20:56 +02:00

26 lines
730 B
Bash

#!/bin/sh
# adapted from main/mkinitfs/mkinitfs.trigger
for i in "$@"; do
# get last element in path
flavor=${i##*/}
if ! [ -f "$i"/kernel.release ]; then
# kernel was uninstalled
rm -f $( readlink -f /boot/booster-$flavor ) \
/boot/booster-$flavor /boot/vmlinuz-$flavor \
/boot/$flavor /boot/$flavor.gz /$flavor /$flavor.gz
continue
fi
read abi_release < "$i"/kernel.release
initfs=booster-$flavor
booster build --force --kernel-version $abi_release /boot/$initfs
done
# extlinux will use path relative partition, so if /boot is on a
# separate partition we want /boot/<kernel> resolve to /<kernel>
if ! [ -e /boot/boot ]; then
ln -sf . /boot/boot 2>/dev/null # silence error in case of FAT
fi
sync
exit 0