From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 2D3DD13835C for ; Sat, 27 Mar 2021 00:00:15 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 16480E082B; Sat, 27 Mar 2021 00:00:14 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E769AE082B for ; Sat, 27 Mar 2021 00:00:13 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 83FEC335CFF for ; Sat, 27 Mar 2021 00:00:12 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E1E4D632 for ; Sat, 27 Mar 2021 00:00:10 +0000 (UTC) From: "Thomas Deutschmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Thomas Deutschmann" Message-ID: <1616799470.cbe66396bdcfdcecd0bbd933c1c94704fd43a13e.whissi@gentoo> Subject: [gentoo-commits] proj/genkernel:master commit in: / X-VCS-Repository: proj/genkernel X-VCS-Files: gen_initramfs.sh X-VCS-Directories: / X-VCS-Committer: whissi X-VCS-Committer-Name: Thomas Deutschmann X-VCS-Revision: cbe66396bdcfdcecd0bbd933c1c94704fd43a13e X-VCS-Branch: master Date: Sat, 27 Mar 2021 00:00:10 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: baa6ba8c-13d5-4e31-bd26-9bc517ce85da X-Archives-Hash: c4bb842ff3230640beb4897a7b847b63 commit: cbe66396bdcfdcecd0bbd933c1c94704fd43a13e Author: Thomas Deutschmann gentoo org> AuthorDate: Fri Mar 26 22:57:50 2021 +0000 Commit: Thomas Deutschmann gentoo org> CommitDate: Fri Mar 26 22:57:50 2021 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=cbe66396 gen_initramfs.sh: append_zfs(): Update UDEV dir in UDEV rules Because we are copying UDEV rules from host system, we have to ensure that used UDEV dir matches our initramfs environment to prevent errors like failed to execute '/lib/udev/vdev_id' '/lib/udev/vdev_id -e': No such file or directory Signed-off-by: Thomas Deutschmann gentoo.org> gen_initramfs.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gen_initramfs.sh b/gen_initramfs.sh index 9a9f07d..aedd038 100755 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -1111,6 +1111,15 @@ append_zfs() { local dest_file="${TDIR%/}${udev_file/${udevdir}/${udevdir_initramfs}}" cp -aL "${udev_file}" "${dest_file}" \ || gen_die "Failed to copy '${udev_file}' to '${dest_file}'" + + if [[ "${dest_file}" == *.rules ]] + then + print_info 5 "Updating UDEV dir in '${dest_file}' ..." + sed -i \ + -e "s|${udevdir}|${udevdir_initramfs}|g" \ + "${dest_file}" \ + || gen_die "Failed to update UDEV dir in '${dest_file}'" + fi done cd "${TDIR}" || gen_die "Failed to chdir to '${TDIR}'!"