]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
UBUNTU: [Debian] postinst -- detect symlinks correctly
authorAndy Whitcroft <apw@canonical.com>
Sun, 31 Jan 2016 14:30:07 +0000 (14:30 +0000)
committerTim Gardner <tim.gardner@canonical.com>
Mon, 20 Feb 2017 03:57:58 +0000 (20:57 -0700)
BugLink: http://bugs.launchpad.net/bugs/1536810
Signed-off-by: Andy Whitcroft <apw@canonical.com>
debian/control-scripts/postinst

index c4fc23f680c3e6b49117f5ecc0c3ff632bc62e2a..dc2d1c172d5a291a4c7bd875a801bd0093df1203 100644 (file)
@@ -856,7 +856,8 @@ if ($initrd) {
     image_magic("initrd.img", $image_dest);
   }
   else {
-    if (! -e "initrd.img") {
+    lstat("initrd.img");
+    if (! -e _) {
       handle_missing_link("initrd.img", $image_dest, "initrd.img-$version",
                           $realimageloc);
     }
@@ -914,7 +915,8 @@ if (! defined $ARGV[1] || ! $ARGV[1] || $ARGV[1] =~ m/<unknown>/og) {
   image_magic($kimage, $image_dest);
 }
 else {
-  if (! -e "$kimage") {
+  lstat("$kimage");
+  if (! -e _) {
     handle_missing_link($kimage, $image_dest, "$kimage-$version", 
                         $realimageloc);
   }