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 B519C138359 for ; Thu, 23 Jul 2020 23:57:44 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 13EC3E0891; Thu, 23 Jul 2020 23:57:42 +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 E5D89E088F for ; Thu, 23 Jul 2020 23:57:41 +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 5B60B34F22D for ; Thu, 23 Jul 2020 23:57:40 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 836E12F8 for ; Thu, 23 Jul 2020 23:57:35 +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: <1595545008.17cdd9c8ca954c180a216b9e33cf8de7be5f4a43.whissi@gentoo> Subject: [gentoo-commits] proj/genkernel:master commit in: defaults/, / X-VCS-Repository: proj/genkernel X-VCS-Files: defaults/initrd.scripts defaults/software.sh gen_initramfs.sh X-VCS-Directories: defaults/ / X-VCS-Committer: whissi X-VCS-Committer-Name: Thomas Deutschmann X-VCS-Revision: 17cdd9c8ca954c180a216b9e33cf8de7be5f4a43 X-VCS-Branch: master Date: Thu, 23 Jul 2020 23:57:35 +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: 2e15fed9-37ce-421d-a9b1-8dc8105b1ad3 X-Archives-Hash: 3a162d424bf2c1207ffa16e40ac5f43b commit: 17cdd9c8ca954c180a216b9e33cf8de7be5f4a43 Author: Thomas Deutschmann gentoo org> AuthorDate: Thu Jul 23 21:05:18 2020 +0000 Commit: Thomas Deutschmann gentoo org> CommitDate: Thu Jul 23 22:56:48 2020 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=17cdd9c8 dmraid: Switch to UDEV usage Signed-off-by: Thomas Deutschmann gentoo.org> defaults/initrd.scripts | 18 +++++++++--------- defaults/software.sh | 2 +- gen_initramfs.sh | 2 ++ 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts index 7d852ee..d2db059 100644 --- a/defaults/initrd.scripts +++ b/defaults/initrd.scripts @@ -1548,10 +1548,12 @@ start_volumes() { if [ "${USE_DMRAID_NORMAL}" = '1' ] then - if [ -x '/sbin/dmraid' ] + if ! hash dmraid >/dev/null 2>&1 then + bad_msg "dodmraid invoked but 'dmraid' not found; Skipping dmraid activation ..." + else good_msg "Activating Device-Mapper RAID(s) ..." - local dmraid_cmd="run /sbin/dmraid -ay" + local dmraid_cmd="run dmraid -ay" if [ -z "${DMRAID_OPTS}" ] then dmraid_cmd="${dmraid_cmd} 2>&1" @@ -1559,16 +1561,14 @@ start_volumes() { dmraid_cmd="${dmraid_cmd} ${DMRAID_OPTS} 2>&1" fi is_log_enabled && dmraid_cmd="${dmraid_cmd} | tee -a '${GK_INIT_LOG}'" - eval "${dmraid_cmd}" - if [ -x '/sbin/kpartx' ] + eval "${dmraid_cmd}" + if [ $? -ne 0 ] then - dmraid_cmd="run /sbin/dmsetup ls --exec '/sbin/kpartx -a -s' 2>&1" - is_log_enabled && dmraid_cmd="${dmraid_cmd} | tee -a '${GK_INIT_LOG}'" - eval "${dmraid_cmd}" + bad_msg "Activation of Device-Mapper RAID(s) failed!" + else + udevsettle fi - else - bad_msg "dodmraid invoked but /sbin/dmraid not found; Skipping dmraid activation ..." fi fi diff --git a/defaults/software.sh b/defaults/software.sh index ae7532f..d8dbfc9 100644 --- a/defaults/software.sh +++ b/defaults/software.sh @@ -60,7 +60,7 @@ GKPKG_CRYPTSETUP_BINPKG="${GKPKG_CRYPTSETUP_BINPKG:-%%CACHE%%/cryptsetup-${GKPKG GKPKG_DMRAID_PN="dmraid" GKPKG_DMRAID_PV="${GKPKG_DMRAID_PV:-VERSION_DMRAID}" -GKPKG_DMRAID_DEPS="lvm" +GKPKG_DMRAID_DEPS="eudev lvm" GKPKG_DMRAID_SRCTAR="${GKPKG_DMRAID_SRCTAR:-${DISTDIR}/dmraid-${GKPKG_DMRAID_PV}.tar.bz2}" GKPKG_DMRAID_SRCDIR="${GKPKG_DMRAID_SRCDIR:-dmraid/${GKPKG_DMRAID_PV}/dmraid}" GKPKG_DMRAID_BINPKG="${GKPKG_DMRAID_BINPKG:-%%CACHE%%/dmraid-${GKPKG_DMRAID_PV}-%%ARCH%%.tar.xz}" diff --git a/gen_initramfs.sh b/gen_initramfs.sh index 1b8c829..24b23bb 100755 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -775,6 +775,8 @@ append_dmraid() { unpack "$(get_gkpkg_binpkg "${PN}")" "${TDIR}" + mkdir -p "${TDIR}"/run/lock/dmraid || gen_die "Failed to create '${TDIR}/run/lock/dmraid'!" + cd "${TDIR}" || gen_die "Failed to chdir to '${TDIR}'!" # Delete unneeded files