71d71e39e6e66a716855aee484cba406c77225d9
[live-boot-grml.git] / debian / postrm
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                 INITRAMFS_ARGS="-u -k all"
11                 ;;
12 esac
13
14 if [ -x /usr/sbin/update-initramfs ] && [ "x$1" != "xtriggered" ] && \
15    dpkg --compare-versions "$DPKG_RUNNING_VERSION" ge '1.14.18'
16 then
17         # this activates the trigger, if triggers are working
18         update-initramfs ${INITRAMFS_ARGS}
19 else
20         # force it to actually happen
21         DPKG_MAINTSCRIPT_PACKAGE='' update-initramfs ${INITRAMFS_ARGS}
22 fi
23
24 #DEBHELPER#