summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Powell <zlinuxman@wowway.com>2010-07-02 08:03:16 +0200
committermaximilian attems <maks@debian.org>2010-07-08 15:09:03 +0200
commit09d251adb669002cbfcd5fd330e1c6471f6fc644 (patch)
tree441da2aa03d93a14b4080da9706cae3467e9edbb
parent7c6221d459e765f6ae8f40361727b72b65c88509 (diff)
downloadinitramfs-tools-09d251adb669002cbfcd5fd330e1c6471f6fc644.tar.gz
initramfs-tools-09d251adb669002cbfcd5fd330e1c6471f6fc644.zip
postinst hook: respect INITRD variable
Do not create an initial RAM file system image for a custom kernel created by make-kpkg if one was not requested by the --initrd flag of make-kpkg. Signed-off-by: maximilian attems <maks@debian.org>
-rwxr-xr-xkernel/postinst.d/initramfs-tools2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/postinst.d/initramfs-tools b/kernel/postinst.d/initramfs-tools
index 68124f7..5005ca4 100755
--- a/kernel/postinst.d/initramfs-tools
+++ b/kernel/postinst.d/initramfs-tools
@@ -9,6 +9,8 @@ bootopt=""
# 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