From 4461c33c7db5a37a04954f530c5769844f154d7e Mon Sep 17 00:00:00 2001
From: Recolic Keghart <root@recolic.net>
Date: Tue, 12 Oct 2021 01:26:20 +0800
Subject: [PATCH] bugfix

---
 aur/PKGBUILD              | 2 +-
 src/hook-kernel-rename.sh | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/aur/PKGBUILD b/aur/PKGBUILD
index 5aed962..7fbc40d 100644
--- a/aur/PKGBUILD
+++ b/aur/PKGBUILD
@@ -3,7 +3,7 @@
 # Mirror: https://github.com/recolic/shared-bootdir-helper
 
 pkgname=shared-bootdir-helper
-pkgver=1.1
+pkgver=1.2
 pkgrel=1
 pkgdesc="Allow multiple linux installations to share the same /boot directory, even with different kernel parameters. "
 url="https://git.recolic.net/root/$pkgname"
diff --git a/src/hook-kernel-rename.sh b/src/hook-kernel-rename.sh
index 4e31f6c..9495897 100755
--- a/src/hook-kernel-rename.sh
+++ b/src/hook-kernel-rename.sh
@@ -44,7 +44,7 @@ while read -r line; do
     generate_mkinitcpio_preset "${new_pkgbase}" && 
 
     # Rename vmlinuz
-    mv "/boot/vmlinuz-${pkgbase}" "/boot/vmlinuz-${new_pkgbase}" && 
+    cp "/$line" "/boot/vmlinuz-${new_pkgbase}" && 
 
     # Overwrite /usr/lib/modules/.../pkgbase to make mkinitcpio-install use the new filename
     echo "${new_pkgbase}" > "${line%/vmlinuz}/pkgbase" && 
-- 
GitLab