Files
ports/core/linux/install
2019-07-23 17:57:27 +08:00

32 lines
530 B
Plaintext
Executable File

# package install script
action=$1
newversion=$2
oldversion=$3
post_install() {
if [ -f /lib/modules/KERNELVERSION ]; then
kernver=$(cat /lib/modules/KERNELVERSION)
else
kernver=$(file /boot/vmlinuz-venom | cut -d ' ' -f9)
fi
if [ $(type -p mkinitramfs) ]; then
mkinitramfs -q -k $kernver -o /boot/initrd-venom.img
fi
depmod $kernver
}
post_upgrade() {
post_install
}
post_remove() {
rm -f /boot/initrd-venom.img
}
case $action in
post-install|post-upgrade) post_install ;;
post-remove) post_remove ;;
esac