scripts/build-kernel: remove the vmlinuz symlink if it exists before (re)creating

This commit is contained in:
Albert Hopkins 2016-10-19 11:46:03 +00:00
parent e0f3835e72
commit d40976c08c
1 changed files with 2 additions and 0 deletions

View File

@ -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: