diff --git a/debian/changelog b/debian/changelog index 22291d467..d80c16051 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,6 +13,8 @@ linux (3.13.2-1~exp1) UNRELEASED; urgency=low * [x86] snd-pcsp: Disable autoload (Closes: #697709) * DFSG: Remove the af9005 initialisation script and vs6624 driver again (they were renamed in 3.7) + * linux-image.postinst: Use lstat() to check symlink existence + (Closes: #738707) -- Ben Hutchings Thu, 23 Jan 2014 15:05:08 +0000 diff --git a/debian/templates/image.plain.postinst.in b/debian/templates/image.plain.postinst.in index 978e4fd73..fe8ba9b5b 100755 --- a/debian/templates/image.plain.postinst.in +++ b/debian/templates/image.plain.postinst.in @@ -537,13 +537,17 @@ if (! defined $ARGV[1] || ! $ARGV[1] || $ARGV[1] =~ m//o) { } } else { - if (! -e "$kimage") { + lstat($kimage); + if (! -e _) { handle_missing_link($kimage, $image_dest, "$kimage-$version", $realimageloc); } - if ($initrd && ! -e "initrd.img") { - handle_missing_link("initrd.img", $image_dest, "initrd.img-$version", - $realimageloc); + if ($initrd) { + lstat("initrd.img"); + if (! -e _) { + handle_missing_link("initrd.img", $image_dest, "initrd.img-$version", + $realimageloc); + } } }