aboutsummaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorTim Gardner <tim.gardner@canonical.com>2011-10-28 11:35:00 -0600
committerJohn Rigby <john.rigby@linaro.org>2011-11-16 14:51:30 -0700
commit2a86e5e58888e84084f30a136304e880783c32dc (patch)
treeb19a683f48a6e55659e11d682c6f4d3f3bdce115 /debian
parent87bed68704e80e453fea17ee5db00e893fa50017 (diff)
downloadlinux-linaro-precise-2a86e5e58888e84084f30a136304e880783c32dc.tar.gz
UBUNTU: Add postinit and postrm scripts to the extras package
BugLink: http://bugs.launchpad.net/bugs/882120 Lack of postinit and postrm packaging scripts prevents proper module registration via depmod. Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Diffstat (limited to 'debian')
-rw-r--r--debian/control-scripts/postinst.extra8
-rw-r--r--debian/control-scripts/postrm.extra8
-rw-r--r--debian/rules.d/2-binary-arch.mk9
3 files changed, 25 insertions, 0 deletions
diff --git a/debian/control-scripts/postinst.extra b/debian/control-scripts/postinst.extra
new file mode 100644
index 00000000000..a370b4c0931
--- /dev/null
+++ b/debian/control-scripts/postinst.extra
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+case "$1" in
+ configure)
+ depmod -a -F /boot/System.map-@@KVER@@ @@KVER@@
+ update-initramfs -u -k @@KVER@@
+ ;;
+esac
diff --git a/debian/control-scripts/postrm.extra b/debian/control-scripts/postrm.extra
new file mode 100644
index 00000000000..0adcc628362
--- /dev/null
+++ b/debian/control-scripts/postrm.extra
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+case "$1" in
+ remove|purge)
+ depmod -a -F /boot/System.map-@@KVER@@ @@KVER@@
+ update-initramfs -u -k @@KVER@@
+ ;;
+esac
diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
index dec5adcf84f..1b26a39c45c 100644
--- a/debian/rules.d/2-binary-arch.mk
+++ b/debian/rules.d/2-binary-arch.mk
@@ -118,6 +118,15 @@ endif
$(DROOT)/control-scripts/$$script > $(pkgdir)/DEBIAN/$$script; \
chmod 755 $(pkgdir)/DEBIAN/$$script; \
done
+ # Install the postinit/postrm scripts in the extras package.
+ if [ -f $(DEBIAN)/control.d/$(target_flavour).inclusion-list ] ; then \
+ install -d $(pkgdir_ex)/DEBIAN; \
+ for script in postinst postrm ; do \
+ sed -e 's/@@KVER@@/$(release)-$(abinum)-$(target_flavour)/g' \
+ debian/control-scripts/$$script.extra > $(pkgdir_ex)/DEBIAN/$$script; \
+ chmod 755 $(pkgdir_ex)/DEBIAN/$$script; \
+ done; \
+ fi
# Install the full changelog.
ifeq ($(do_doc_package),true)