From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:48126) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j5HbV-0004FK-CZ for guix-patches@gnu.org; Fri, 21 Feb 2020 18:21:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j5HbU-00009S-DH for guix-patches@gnu.org; Fri, 21 Feb 2020 18:21:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:42437) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j5HbU-00009I-A7 for guix-patches@gnu.org; Fri, 21 Feb 2020 18:21:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j5HbU-0000XO-6a for guix-patches@gnu.org; Fri, 21 Feb 2020 18:21:04 -0500 Subject: [bug#39729] [PATCH 6/7] installer: Honor /tmp/installer-system-init-options. Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Sat, 22 Feb 2020 00:20:29 +0100 Message-Id: <20200221232030.27752-6-ludo@gnu.org> In-Reply-To: <20200221232030.27752-1-ludo@gnu.org> References: <20200221232030.27752-1-ludo@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 39729@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= * gnu/installer/final.scm (install-system): Honor "/tmp/installer-system-init-options". --- gnu/installer/final.scm | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/gnu/installer/final.scm b/gnu/installer/final.scm index 7193ecb8a4..869be8814b 100644 --- a/gnu/installer/final.scm +++ b/gnu/installer/final.scm @@ -111,9 +111,19 @@ cow-store service." Start COW-STORE service on target directory and launch guix install command in a subshell. LOCALE must be the locale name under which that command will run, or #f. Return #t on success and #f on failure." - (let ((install-command (list "guix" "system" "init" "--fallback" - (%installer-configuration-file) - (%installer-target-dir)))) + (let* ((options (catch 'system-error + (lambda () + ;; If this file exists, it can provide + ;; additional command-line options. + (call-with-input-file + "/tmp/installer-system-init-options" + read)) + (const '()))) + (install-command (append (list "guix" "system" "init" + "--fallback") + options + (list (%installer-configuration-file) + (%installer-target-dir))))) (mkdir-p (%installer-target-dir)) ;; We want to initialize user passwords but we don't want to store them in -- 2.25.1