#!/bin/sh -e

version="$1"
bootopt=""

# passing the kernel version is required
if [ -z "${version}" ]; then
	echo >&2 "W: kwartz-autoupdate: ${DPKG_MAINTSCRIPT_PACKAGE:-kernel package} did not pass a version number"
	exit 2
fi

if dpkg --compare-versions ${version} lt 6.8; then
	exit 0
fi

find /lib/modules/${version} -name "*.ko.zst" -delete
rm -f /lib/modules/${version}/kwartz_compress_done
