diff --git a/Makefile b/Makefile index 0df19af3f..8becf0947 100644 --- a/Makefile +++ b/Makefile @@ -369,6 +369,8 @@ dpkg: ../scst_$(VERSION).orig.tar.gz debian/scst.dkms && \ sed 's/%{KVER}/$(KVER)/' \ debian/scst.preinst && \ + sed 's/%{KVER}/$(KVER)/' \ + debian/scst.postinst && \ output_files=( \ ../*_$(VERSION)-$(DEBIAN_REVISION)_*.deb \ ../*_$(VERSION)-$(DEBIAN_REVISION)_*.ddeb \ diff --git a/debian/rules b/debian/rules index 0c49bded8..af061fb37 100755 --- a/debian/rules +++ b/debian/rules @@ -29,7 +29,8 @@ export KDIR=$(DEB_KDIR_SET) clean: dh_testdir && \ dh_prep -Xqla_isp/TAGS -Xdebian/changelog && \ - scripts/clean-source-tree -x debian/changelog -x debian/compat -x debian/scst.preinst + scripts/clean-source-tree -x debian/changelog -x debian/compat -x debian/scst.preinst \ + -x debian/scst.postinst build: make 2release && \ diff --git a/debian/scst.postinst b/debian/scst.postinst.in similarity index 98% rename from debian/scst.postinst rename to debian/scst.postinst.in index d1569e33c..f535eebd9 100644 --- a/debian/scst.postinst +++ b/debian/scst.postinst.in @@ -23,7 +23,7 @@ case "$1" in mkdir -p /var/lib/scst/dif_tags mkdir -p /var/lib/scst/pr mkdir -p /var/lib/scst/vdev_mode_pages - depmod;; + depmod "%{KVER}";; abort-upgrade|abort-remove|abort-deconfigure) ;;