mirror of
https://github.com/outbackdingo/ports.git
synced 2026-01-28 02:20:05 +00:00
32 lines
533 B
Plaintext
32 lines
533 B
Plaintext
# 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 [ $(command -v 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
|
|
|