X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=debian%2Flive-initramfs.postinst;h=2bae8ae0df6399f6426e799a2eeedda42f5ada95;hb=988bdd427d963e255e75eb19fba0af98a4ea99cd;hp=b94b3bdfb321196758842f84e1b9051db346e848;hpb=c8d307dda6fb07a63dfe69381fc5176ad925862a;p=live-boot-grml.git 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