diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2010-09-09 14:10:39 -0700 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2010-09-09 14:10:39 -0700 |
commit | d000689490bbc3508f18b878757b3d2bb04d8a69 (patch) | |
tree | 40388b9f23e75fc4c0884f7fb076f2d6382e1136 /kernel/postinst.d/initramfs-tools | |
parent | b9c92a3bb82e860c8368eb7933f5ec4ddcd74bcb (diff) | |
parent | 3963c563cf1ea4b1126a4c1949181029a0ff2305 (diff) | |
download | initramfs-tools-d000689490bbc3508f18b878757b3d2bb04d8a69.tar.gz initramfs-tools-d000689490bbc3508f18b878757b3d2bb04d8a69.zip |
Merge remote branch 'debian/master' into upstream
Diffstat (limited to 'kernel/postinst.d/initramfs-tools')
-rwxr-xr-x | kernel/postinst.d/initramfs-tools | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/kernel/postinst.d/initramfs-tools b/kernel/postinst.d/initramfs-tools new file mode 100755 index 0000000..d4db23d --- /dev/null +++ b/kernel/postinst.d/initramfs-tools @@ -0,0 +1,31 @@ +#!/bin/sh + +version="$1" +bootopt="" + +# passing the kernel version is required +[ -z "${version}" ] && exit 0 + +# kernel-package passes an extra arg +if [ -n "$2" ]; then + if [ -n "${KERNEL_PACKAGE_VERSION}" ]; then + # exit if custom kernel does not need an initramfs + [ "$INITRD" = 'No' ] && exit 0 + bootdir=$(dirname "$2") + bootopt="-b ${bootdir}" + else + # official Debian linux-images take care themself + exit 0 + fi +fi + +# avoid running multiple times +if [ -n "$DEB_MAINT_PARAMS" ]; then + eval set -- "$DEB_MAINT_PARAMS" + if [ -z "$1" ] || [ "$1" != "configure" ]; then + exit 0 + fi +fi + +# we're good - create initramfs. update runs do_bootloader +update-initramfs -c -t -k "${version}" ${bootopt} >&2 |