2024-10-29 05:12:06 +03:00
|
|
|
#!/bin/sh
|
|
|
|
set -e
|
2024-10-23 12:12:30 +03:00
|
|
|
|
2024-10-29 05:12:06 +03:00
|
|
|
[ "$1" = configure ] || exit 0
|
2024-10-23 12:12:30 +03:00
|
|
|
|
2024-10-29 05:12:06 +03:00
|
|
|
version='@abiname@@localversion@'
|
|
|
|
image_path="/boot/@image-stem@-${version}"
|
2024-10-23 12:12:30 +03:00
|
|
|
|
2024-10-29 05:12:06 +03:00
|
|
|
depmod "${version}"
|
2024-10-23 12:12:30 +03:00
|
|
|
|
2024-10-29 05:12:06 +03:00
|
|
|
if command -v linux-update-symlinks >/dev/null ; then
|
2024-10-23 12:12:30 +03:00
|
|
|
change=install
|
2024-10-29 05:12:06 +03:00
|
|
|
[ -f "/lib/modules/${version}/.fresh-install" ] || change=upgrade
|
|
|
|
|
|
|
|
linux-update-symlinks "${change}" "${version}" "${image_path}"
|
2024-10-23 12:12:30 +03:00
|
|
|
fi
|
2024-10-29 05:12:06 +03:00
|
|
|
rm -f "/lib/modules/${version}/.fresh-install"
|
2024-10-23 12:12:30 +03:00
|
|
|
|
2024-10-29 05:12:06 +03:00
|
|
|
if [ -d /etc/kernel/postinst.d ] ; then
|
|
|
|
DEB_MAINT_PARAMS="$*" \
|
|
|
|
run-parts --report --exit-on-error \
|
|
|
|
"--arg=${version}" \
|
|
|
|
"--arg=${image_path}" \
|
|
|
|
/etc/kernel/postinst.d
|
2024-10-23 12:12:30 +03:00
|
|
|
fi
|
|
|
|
|
|
|
|
exit 0
|