Updating to standards 3.8.0.
[live-initramfs-grml.git] / debian / postinst
1 #!/bin/sh
2
3 case "$(ls -l /boot/vmlinuz-* | wc -l)" in
4         1)
5                 # We only have one kernel installed, so we can use "-u"
6                 # which will use dpkg-trigger inside update-initramfs
7                 INITRAMFS_ARGS="-u"
8                 ;;
9
10         *)
11                 INITRAMFS_ARGS="-u -k all"
12                 ;;
13 esac
14
15 if [ -x /usr/sbin/update-initramfs ] && [ "${1}" != "triggered" ] && \
16         dpkg --compare-versions "${DPKG_RUNNING_VERSION}" ge "1.14.18"
17 then
18         # this activates the trigger, if triggers are working
19         update-initramfs ${INITRAMFS_ARGS}
20 else
21         # force it to actually happen
22         DPKG_MAINTSCRIPT_PACKAGE="" update-initramfs ${INITRAMFS_ARGS}
23 fi
24
25 #DEBHELPER#