1
0
linux/debian/templates/image.postinst.in
Konstantin Demin eb2bdc81cb rewrite scripts
try to provide better syntax and avoid using bash
2024-10-29 05:12:06 +03:00

28 lines
615 B
Bash

#!/bin/sh
set -e
[ "$1" = configure ] || exit 0
version='@abiname@@localversion@'
image_path="/boot/@image-stem@-${version}"
depmod "${version}"
if command -v linux-update-symlinks >/dev/null ; then
change=install
[ -f "/lib/modules/${version}/.fresh-install" ] || change=upgrade
linux-update-symlinks "${change}" "${version}" "${image_path}"
fi
rm -f "/lib/modules/${version}/.fresh-install"
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
fi
exit 0