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 51913138359 for ; Sat, 1 Aug 2020 21:42:00 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 74D89E0AA2; Sat, 1 Aug 2020 21:41:58 +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 55BA2E0AA0 for ; Sat, 1 Aug 2020 21:41:58 +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 103E034F327 for ; Sat, 1 Aug 2020 21:41:54 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 130DC304 for ; Sat, 1 Aug 2020 21:41:48 +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: <1596314915.f6bf1e2ee59f836b0c9cfd64617dea29f89891ed.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: f6bf1e2ee59f836b0c9cfd64617dea29f89891ed X-VCS-Branch: master Date: Sat, 1 Aug 2020 21:41:48 +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: 074e9556-13ff-447f-a3e7-dc4322049cbc X-Archives-Hash: 3b040606714f786d54bc98f6815aefb2 commit: f6bf1e2ee59f836b0c9cfd64617dea29f89891ed Author: Thomas Deutschmann gentoo org> AuthorDate: Sat Aug 1 18:56:45 2020 +0000 Commit: Thomas Deutschmann gentoo org> CommitDate: Sat Aug 1 20:48:35 2020 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=f6bf1e2e gen_determineargs.sh: determine_real_args(): Check if we can write into /etc/kernels when --save-config is set Signed-off-by: Thomas Deutschmann gentoo.org> gen_determineargs.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/gen_determineargs.sh b/gen_determineargs.sh index 75dc151..d9056e4 100755 --- a/gen_determineargs.sh +++ b/gen_determineargs.sh @@ -891,6 +891,21 @@ determine_real_args() { gen_die "--module-rebuild-cmd '${MODULEREBUILD_CMD}' contains at least one of the following disallowed characters: '\$&|>()'!" fi fi + + if isTrue "${SAVE_CONFIG}" + then + local kconf_savedir=/etc/kernels + if [ ! -d "${kconf_savedir}" ] + then + kconf_savedir=/etc + [ ! -d "${kconf_savedir}" ] && kconf_savedir=/ + fi + + if [ ! -w "${kconf_savedir}" ] + then + gen_die "Cannot write to '${kconf_savedir}' but --save-config is set!" + fi + fi fi if isTrue "${BUILD_RAMDISK}"