diff options
| author | Daniel Baumann <daniel@debian.org> | 2009-02-08 00:18:21 +0100 |
|---|---|---|
| committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 17:48:04 +0100 |
| commit | c8d307dda6fb07a63dfe69381fc5176ad925862a (patch) | |
| tree | 9139bf5d5861bbb72a9c339439f39b88dca32adf /debian/live-initramfs.postrm | |
| parent | 225b4d5b57ac7a69aa47b408f5d3f69ec53242da (diff) | |
| download | live-boot-c8d307dda6fb07a63dfe69381fc5176ad925862a.tar.gz live-boot-c8d307dda6fb07a63dfe69381fc5176ad925862a.zip | |
Prefixing debhelper files with package name.
Diffstat (limited to 'debian/live-initramfs.postrm')
| -rw-r--r-- | debian/live-initramfs.postrm | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/debian/live-initramfs.postrm b/debian/live-initramfs.postrm new file mode 100644 index 0000000..b94b3bd --- /dev/null +++ b/debian/live-initramfs.postrm @@ -0,0 +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" + ;; + + *) + 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# |
