summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2010-03-14 17:47:21 +0100
committerDaniel Baumann <daniel@debian.org>2011-03-09 17:48:07 +0100
commit3d5f74ad7e7f55e7f4d91c6afb001b66a194b3fe (patch)
tree1bc3f192b0a4b800041c88b15919176a6f4bcc86
parenta40dcf2d8b9ab4190e8b7794c4867c9f768c2432 (diff)
downloadlive-boot-3d5f74ad7e7f55e7f4d91c6afb001b66a194b3fe.tar.gz
live-boot-3d5f74ad7e7f55e7f4d91c6afb001b66a194b3fe.zip
Simplyfing initramfs triggers (Closes: #521129, #545842).
-rw-r--r--debian/live-initramfs.postinst32
-rw-r--r--debian/live-initramfs.postrm25
2 files changed, 16 insertions, 41 deletions
diff --git a/debian/live-initramfs.postinst b/debian/live-initramfs.postinst
index b94b3bd..2bae8ae 100644
--- a/debian/live-initramfs.postinst
+++ b/debian/live-initramfs.postinst
@@ -1,25 +1,25 @@
#!/bin/sh
-case "$(ls -l /boot/vmlinu* | wc -l)" in
- 1)
- # We only have one kernel installed, so we can use "-u"
- # which will use dpkg-trigger inside update-initramfs
- INITRAMFS_ARGS="-u"
+set -e
+
+case "${1}" in
+ configure)
+ if [ -x /usr/sbin/update-initramfs ]
+ then
+ update-initramfs -u
+ fi
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+
;;
*)
- INITRAMFS_ARGS="-u -k all"
+ echo "postinst called with unknown argument \`${1}'" >&2
+ exit 1
;;
esac
-if [ -x /usr/sbin/update-initramfs ] && [ "${1}" != "triggered" ] && \
- dpkg --compare-versions "${DPKG_RUNNING_VERSION}" ge "1.14.18"
-then
- # this activates the trigger, if triggers are working
- update-initramfs ${INITRAMFS_ARGS}
-else
- # force it to actually happen
- DPKG_MAINTSCRIPT_PACKAGE="" update-initramfs ${INITRAMFS_ARGS}
-fi
-
#DEBHELPER#
+
+exit 0
diff --git a/debian/live-initramfs.postrm b/debian/live-initramfs.postrm
deleted file mode 100644
index b94b3bd..0000000
--- a/debian/live-initramfs.postrm
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-case "$(ls -l /boot/vmlinu* | wc -l)" in
- 1)
- # We only have one kernel installed, so we can use "-u"
- # which will use dpkg-trigger inside update-initramfs
- INITRAMFS_ARGS="-u"
- ;;
-
- *)
- INITRAMFS_ARGS="-u -k all"
- ;;
-esac
-
-if [ -x /usr/sbin/update-initramfs ] && [ "${1}" != "triggered" ] && \
- dpkg --compare-versions "${DPKG_RUNNING_VERSION}" ge "1.14.18"
-then
- # this activates the trigger, if triggers are working
- update-initramfs ${INITRAMFS_ARGS}
-else
- # force it to actually happen
- DPKG_MAINTSCRIPT_PACKAGE="" update-initramfs ${INITRAMFS_ARGS}
-fi
-
-#DEBHELPER#