improve the post script
This commit is contained in:
parent
5339e5a06d
commit
09affb66e2
2 changed files with 11 additions and 1 deletions
|
@ -5,7 +5,7 @@
|
|||
|
||||
Name: opi5-efi
|
||||
Version: 0.0.2
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Summary: Necessary files for booting from vendor U-Boot on Orange Pi 5
|
||||
License: GPL
|
||||
Provides: %{name}-%{version}
|
||||
|
|
10
post.sh
10
post.sh
|
@ -6,6 +6,16 @@ UNAME_R="$(</boot/.uname)"
|
|||
BOOT_PART="$(grep '/ ' /etc/fstab | awk '{print $1}')"
|
||||
replacewithfullver
|
||||
|
||||
if [ -x /sbin/installkernel -a -r "/boot/vmlinuz-${UNAME_R}" -a -r "/boot/System.map-${UNAME_R}" ]; then
|
||||
cp "/boot/vmlinuz-${UNAME_R}" "/boot/.vmlinuz-${UNAME_R}-rpm"
|
||||
cp "/boot/System.map-${UNAME_R}" "/boot/.System.map-${UNAME_R}-rpm"
|
||||
rm -f "/boot/vmlinuz-${UNAME_R}" "/boot/System.map-${UNAME_R}"
|
||||
/sbin/installkernel "${UNAME_R}" "/boot/.vmlinuz-${UNAME_R}-rpm" "/boot/.System.map-${UNAME_R}-rpm"
|
||||
rm -f "/boot/.vmlinuz-${UNAME_R}-rpm" "/boot/.System.map-${UNAME_R}-rpm"
|
||||
fi
|
||||
ln "/boot/.uname-${UNAME_R}" /boot/.uname
|
||||
|
||||
|
||||
cp /opt/opi5-efi/boot.cmd "/boot/efi/boot.cmd-${FULL_VER}"
|
||||
cp /opt/opi5-efi/uEnv.txt "/boot/efi/uEnv.txt-${FULL_VER}"
|
||||
|
||||
|
|
Loading…
Reference in a new issue