From 5c04b00cf463a543b8ffc9eb55991f6b4cc145dd Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 19 Feb 2020 12:08:40 +0100 Subject: installer: Log important bits to syslog. * gnu/installer.scm (installer-program): Log crashes with 'syslog'. * gnu/installer/parted.scm (luks-format-and-open, luks-close) (mount-user-partitions, umount-user-partitions): Add 'syslog' calls. * gnu/installer/steps.scm (run-installer-steps): Log the running step with 'syslog'. * gnu/installer/utils.scm (run-shell-command): Add calls to 'syslog'. --- gnu/installer/parted.scm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'gnu/installer/parted.scm') diff --git a/gnu/installer/parted.scm b/gnu/installer/parted.scm index c2b02c9281..6c805cc053 100644 --- a/gnu/installer/parted.scm +++ b/gnu/installer/parted.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2018, 2019 Mathieu Othacehe -;;; Copyright © 2019 Ludovic Courtès +;;; Copyright © 2019, 2020 Ludovic Courtès ;;; Copyright © 2020 Tobias Geerinckx-Rice ;;; ;;; This file is part of GNU Guix. @@ -1070,6 +1070,8 @@ (define (luks-format-and-open user-partition) (call-with-luks-key-file password (lambda (key-file) + (syslog "formatting and opening LUKS entry ~s at ~s~%" + label file-name) (system* "cryptsetup" "-q" "luksFormat" file-name key-file) (system* "cryptsetup" "open" "--type" "luks" "--key-file" key-file file-name label))))) @@ -1077,6 +1079,7 @@ (define (luks-format-and-open user-partition) (define (luks-close user-partition) "Close the encrypted partition pointed by USER-PARTITION." (let ((label (user-partition-crypt-label user-partition))) + (syslog "closing LUKS entry ~s~%" label) (system* "cryptsetup" "close" label))) (define (format-user-partitions user-partitions) @@ -1150,6 +1153,7 @@ (define (mount-user-partitions user-partitions) (file-name (user-partition-upper-file-name user-partition))) (mkdir-p target) + (syslog "mounting ~s on ~s~%" file-name target) (mount file-name target mount-type))) sorted-partitions))) @@ -1165,6 +1169,7 @@ (define (umount-user-partitions user-partitions) (target (string-append (%installer-target-dir) mount-point))) + (syslog "unmounting ~s~%" target) (umount target) (when crypt-label (luks-close user-partition)))) -- cgit v1.2.3