Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplyfing initramfs triggers (Closes: #521129, #545842).
- Loading branch information
1 parent
2028680
commit 1eeaec5
Showing
2 changed files
with
16 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file was deleted.
Oops, something went wrong.