From d40976c08c55678a4a6914ae47df87be18bee6fb Mon Sep 17 00:00:00 2001 From: Albert Hopkins Date: Wed, 19 Oct 2016 11:46:03 +0000 Subject: [PATCH] scripts/build-kernel: remove the vmlinuz symlink if it exists before (re)creating --- scripts/build-kernel | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/build-kernel b/scripts/build-kernel index 101fc23..585cd3a 100755 --- a/scripts/build-kernel +++ b/scripts/build-kernel @@ -90,6 +90,8 @@ 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'): + os.unlink('/boot/vmlinuz') os.symlink(filename, '/boot/vmlinuz') break else: