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 31518138334 for ; Thu, 5 Dec 2019 23:52:19 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 826AEE0946; Thu, 5 Dec 2019 23:52:17 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 837C8E094B for ; Thu, 5 Dec 2019 23:52:16 +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 B0C9634D81E for ; Thu, 5 Dec 2019 23:52:15 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id BCED38D8 for ; Thu, 5 Dec 2019 23:52:12 +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: <1575473628.6aed9147207be0b96e49d52605397a2fc594ec27.whissi@gentoo> Subject: [gentoo-commits] proj/genkernel:master commit in: / X-VCS-Repository: proj/genkernel X-VCS-Files: gen_determineargs.sh X-VCS-Directories: / X-VCS-Committer: whissi X-VCS-Committer-Name: Thomas Deutschmann X-VCS-Revision: 6aed9147207be0b96e49d52605397a2fc594ec27 X-VCS-Branch: master Date: Thu, 5 Dec 2019 23:52:12 +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: 06ad840f-5ab3-4896-b86f-161c132f3503 X-Archives-Hash: c8df54e259b5b4f5df15ad1520063398 commit: 6aed9147207be0b96e49d52605397a2fc594ec27 Author: Thomas Deutschmann gentoo org> AuthorDate: Wed Dec 4 15:33:48 2019 +0000 Commit: Thomas Deutschmann gentoo org> CommitDate: Wed Dec 4 15:33:48 2019 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=6aed9147 gen_determineargs.sh: determine_real_args(): Fix /etc/multipath.conf check Using "-s" is not enough, file could be a directory. Signed-off-by: Thomas Deutschmann gentoo.org> gen_determineargs.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gen_determineargs.sh b/gen_determineargs.sh index 0fd24d5..952b31e 100755 --- a/gen_determineargs.sh +++ b/gen_determineargs.sh @@ -900,9 +900,12 @@ determine_real_args() { gen_die "${error_msg}" fi - if [ ! -s "/etc/multipath.conf" ] + if [ ! -e "/etc/multipath.conf" ] then - gen_die "'/etc/multipath.conf' is required for --multipath but file does not exist or is empty!" + gen_die "'/etc/multipath.conf' is required for --multipath but file does not exist!" + elif [[ -d "/etc/multipath.conf" || ! -s "/etc/multipath.conf" ]] + then + gen_die "'/etc/multipath.conf' is required for --multipath but it is either not a file or is empty!" fi fi