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
|
|
|
if [ "$1" = abort-upgrade ] ; then exit 0 ; fi
|
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
|
|
|
|
|
|
|
if [ "$1" = install ]; then
|
|
|
|
# Create a flag file for postinst
|
2024-10-29 05:12:06 +03:00
|
|
|
mkdir -p "/lib/modules/${version}"
|
|
|
|
touch "/lib/modules/${version}/.fresh-install"
|
2024-10-23 12:12:30 +03:00
|
|
|
fi
|
|
|
|
|
2024-10-29 05:12:06 +03:00
|
|
|
if [ -d /etc/kernel/preinst.d ] ; then
|
|
|
|
DEB_MAINT_PARAMS="$*" \
|
|
|
|
run-parts --report --exit-on-error \
|
|
|
|
"--arg=${version}" \
|
|
|
|
"--arg=${image_path}" \
|
|
|
|
/etc/kernel/preinst.d
|
2024-10-23 12:12:30 +03:00
|
|
|
fi
|
|
|
|
|
|
|
|
exit 0
|