From 7ef2da9e8387f6782ae96a0913e82820bc6ccd84 Mon Sep 17 00:00:00 2001 From: Albert Hopkins Date: Thu, 8 Dec 2016 11:59:21 +0000 Subject: [PATCH] scripts/buildkernel: use lexists() instead of exists() exists() will return false for broken symlinks. We need lexists() instead. --- scripts/build-kernel | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build-kernel b/scripts/build-kernel index 585cd3a..43b769c 100755 --- a/scripts/build-kernel +++ b/scripts/build-kernel @@ -90,7 +90,7 @@ def install_kernel(): # exists). I still do this however. for filename in os.listdir('/boot'): if filename.startswith('vmlinuz-'): - if os.path.exists('/boot/vmlinuz'): + if os.path.lexists('/boot/vmlinuz'): os.unlink('/boot/vmlinuz') os.symlink(filename, '/boot/vmlinuz') break