From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 415F413825A for ; Mon, 16 May 2016 06:55:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 50681224046; Mon, 16 May 2016 06:55:48 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5D867224042 for ; Mon, 16 May 2016 06:55:47 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BF6AC340CC3 for ; Mon, 16 May 2016 06:55:45 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A278C971 for ; Mon, 16 May 2016 06:55:43 +0000 (UTC) From: "Robin H. Johnson" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Robin H. Johnson" Message-ID: <1463381380.493af2b716fe55a37139858c9f1e8ddb44df4e71.robbat2@gentoo> Subject: [gentoo-commits] proj/genkernel:master commit in: / X-VCS-Repository: proj/genkernel X-VCS-Files: gen_cmdline.sh X-VCS-Directories: / X-VCS-Committer: robbat2 X-VCS-Committer-Name: Robin H. Johnson X-VCS-Revision: 493af2b716fe55a37139858c9f1e8ddb44df4e71 X-VCS-Branch: master Date: Mon, 16 May 2016 06:55:43 +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-Archives-Salt: 948b978b-d8bc-46f7-844d-6475b187e06a X-Archives-Hash: 3578ae3581ab214c3f24b99ee6d8254d commit: 493af2b716fe55a37139858c9f1e8ddb44df4e71 Author: Robin H. Johnson gentoo org> AuthorDate: Mon May 16 06:49:40 2016 +0000 Commit: Robin H. Johnson gentoo org> CommitDate: Mon May 16 06:49:40 2016 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=493af2b7 gen_cmdline: bug #544172: sanity check on mdadm/dmraid. Signed-off-by: Robin H. Johnson gentoo.org> gen_cmdline.sh | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/gen_cmdline.sh b/gen_cmdline.sh index e9e7401..24cb607 100755 --- a/gen_cmdline.sh +++ b/gen_cmdline.sh @@ -297,6 +297,12 @@ parse_cmdline() { --mdadm|--no-mdadm) CMD_MDADM=`parse_optbool "$*"` print_info 2 "CMD_MDADM: $CMD_MDADM" + if [ "$CMD_MDADM" = "1" -a ! -e /sbin/mdadm ] + then + echo 'Error: --multipath requires sys-fs/mdadm' + echo ' to be installed on the host system.' + exit 1 + fi ;; --mdadm-config=*) CMD_MDADM_CONFIG=`parse_opt "$*"` @@ -320,10 +326,16 @@ parse_cmdline() { ;; --dmraid|--no-dmraid) CMD_DMRAID=`parse_optbool "$*"` + if [ "$CMD_DMRAID" = "1" -a ! -e /usr/sbin/dmraid ] + then + echo 'Error: --dmraid requires sys-fs/dmraid' + echo ' to be installed on the host system.' + exit 1 + fi if [ "$CMD_DMRAID" = "1" -a ! -e /usr/include/libdevmapper.h ] then - echo 'Error: --dmraid requires LVM2 to be installed' - echo ' on the host system; try "emerge lvm2".' + echo 'Error: --dmraid requires sys-fs/lvm2' + echo ' to be installed on the host system.' exit 1 fi print_info 2 "CMD_DMRAID: ${CMD_DMRAID}" @@ -346,10 +358,16 @@ parse_cmdline() { ;; --multipath|--no-multipath) CMD_MULTIPATH=`parse_optbool "$*"` + if [ "$CMD_MULTIPATH" = "1" -a ! -e /sbin/multipath ] + then + echo 'Error: --multipath requires sys-fs/multipath-tools' + echo ' to be installed on the host system.' + exit 1 + fi if [ "$CMD_MULTIPATH" = "1" -a ! -e /usr/include/libdevmapper.h ] then - echo 'Error: --multipath requires LVM2 to be installed' - echo ' on the host;system; try "emerge lvm2".' + echo 'Error: --multipath requires sys-fs/lvm2' + echo ' to be installed on the host system.' exit 1 fi print_info 2 "CMD_MULTIPATH: ${CMD_MULTIPATH}"