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 66D91138334 for ; Sun, 21 Jul 2019 16:26:46 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 63E7EE0875; Sun, 21 Jul 2019 16:26:43 +0000 (UTC) Received: from smtp.gentoo.org (mail.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 4A8CAE0875 for ; Sun, 21 Jul 2019 16:26:43 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (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 6B0F63483E5 for ; Sun, 21 Jul 2019 16:26:42 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 370EB742 for ; Sun, 21 Jul 2019 16:26:38 +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: <1563724921.e9eaf78b66f511ff8c4f38cd42a8d0bcdf5180a7.whissi@gentoo> Subject: [gentoo-commits] proj/genkernel:master commit in: / X-VCS-Repository: proj/genkernel X-VCS-Files: gen_funcs.sh X-VCS-Directories: / X-VCS-Committer: whissi X-VCS-Committer-Name: Thomas Deutschmann X-VCS-Revision: e9eaf78b66f511ff8c4f38cd42a8d0bcdf5180a7 X-VCS-Branch: master Date: Sun, 21 Jul 2019 16:26:38 +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: 26307a9d-721d-4530-b8be-4868c0b64927 X-Archives-Hash: 461e846913d7a174ba97737967fadf5f commit: e9eaf78b66f511ff8c4f38cd42a8d0bcdf5180a7 Author: Thomas Deutschmann gentoo org> AuthorDate: Sat Jul 20 22:09:56 2019 +0000 Commit: Thomas Deutschmann gentoo org> CommitDate: Sun Jul 21 16:02:01 2019 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=e9eaf78b gen_funcs.sh: set_config_with_override(): Bail out when we failed to set config variable Signed-off-by: Thomas Deutschmann gentoo.org> gen_funcs.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/gen_funcs.sh b/gen_funcs.sh index 6161405..9aa4e24 100755 --- a/gen_funcs.sh +++ b/gen_funcs.sh @@ -1317,14 +1317,18 @@ set_config_with_override() { then Result=${!CfgVar} # we need to set the CMD_* according to configfile... - eval ${OverrideVar}=\"${Result}\" + eval ${OverrideVar}=\"${Result}\" \ + || small_die "Failed to set variable '${OverrideVar}=${Result}' !" + print_info 5 " $CfgVar set in config file to \"${Result}\"." else if [ -n "$Default" ] then Result=${Default} # set OverrideVar to Result, otherwise CMD_* may not be initialized... - eval ${OverrideVar}=\"${Result}\" + eval ${OverrideVar}=\"${Result}\" \ + || small_die "Failed to set variable '${OverrideVar}=${Result}' !" + print_info 5 " $CfgVar defaulted to \"${Result}\"." else print_info 5 " $CfgVar not set." @@ -1342,7 +1346,8 @@ set_config_with_override() { fi fi - eval ${CfgVar}=\"${Result}\" + eval ${CfgVar}=\"${Result}\" \ + || small_die "Failed to set variable '${CfgVar}=${Result}' !" } # @FUNCTION: restore_boot_mount_state