From b8cdf2c27d74ab33286b3d9cf9bb22687a9f16e6 Mon Sep 17 00:00:00 2001 From: "Andrew J. Hesford" Date: Wed, 5 Aug 2020 12:13:09 -0400 Subject: [PATCH] mkinitcpio: improve consistency of relative paths in kernel hooks --- srcpkgs/mkinitcpio/files/kernel-hook-postinst | 4 ++-- srcpkgs/mkinitcpio/files/kernel-hook-postrm | 4 +--- srcpkgs/mkinitcpio/template | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/srcpkgs/mkinitcpio/files/kernel-hook-postinst b/srcpkgs/mkinitcpio/files/kernel-hook-postinst index 31fe5705812..c6f2ab81264 100644 --- a/srcpkgs/mkinitcpio/files/kernel-hook-postinst +++ b/srcpkgs/mkinitcpio/files/kernel-hook-postinst @@ -7,9 +7,9 @@ PKGNAME="$1" VERSION="$2" -if [ ! -x bin/mkinitcpio ]; then +if [ ! -x usr/bin/mkinitcpio ]; then exit 0 fi -mkinitcpio -g boot/initramfs-${VERSION}.img -k ${VERSION} +usr/bin/mkinitcpio -g boot/initramfs-${VERSION}.img -k ${VERSION} exit $? diff --git a/srcpkgs/mkinitcpio/files/kernel-hook-postrm b/srcpkgs/mkinitcpio/files/kernel-hook-postrm index f099aba66ca..028fd097b87 100644 --- a/srcpkgs/mkinitcpio/files/kernel-hook-postrm +++ b/srcpkgs/mkinitcpio/files/kernel-hook-postrm @@ -7,7 +7,5 @@ PKGNAME="$1" VERSION="$2" -if [ -f /boot/initramfs-${VERSION}.img ]; then - rm -f /boot/initramfs-${VERSION}.img -fi +rm -f boot/initramfs-${VERSION}.img exit $? diff --git a/srcpkgs/mkinitcpio/template b/srcpkgs/mkinitcpio/template index 303905d0f1f..a0f44360db4 100644 --- a/srcpkgs/mkinitcpio/template +++ b/srcpkgs/mkinitcpio/template @@ -1,7 +1,7 @@ # Template file for 'mkinitcpio' pkgname=mkinitcpio version=27 -revision=1 +revision=2 archs=noarch build_style=gnu-makefile depends="busybox-static bsdtar bash"