From ca0ef47b7181f5c4ee1edd6e9a4f1c4b9bd16053 Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Mon, 18 Jun 2018 22:11:54 -0400 Subject: [PATCH] initrd-logger: enable = false will disable it completely. --- modules/initrd-logger-late.nix | 4 ++-- modules/initrd-logger.nix | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/initrd-logger-late.nix b/modules/initrd-logger-late.nix index 78611686..98b3a0a9 100644 --- a/modules/initrd-logger-late.nix +++ b/modules/initrd-logger-late.nix @@ -14,7 +14,7 @@ in config.mobile.boot.stage-1 = { # FIXME : this may not cleanup nicely. # This implementation is naive and simple. - init = lib.mkOrder AFTER_SWITCH_ROOT_INIT '' + init = lib.mkIf cfg.enable (lib.mkOrder AFTER_SWITCH_ROOT_INIT '' _stop_logger() { local i=0 pid # re-attach to /dev/console @@ -22,6 +22,6 @@ in # Kill the process kill $(cat ${pidfile}) } - ''; + ''); }; } diff --git a/modules/initrd-logger.nix b/modules/initrd-logger.nix index 6566a684..77da81d2 100644 --- a/modules/initrd-logger.nix +++ b/modules/initrd-logger.nix @@ -46,7 +46,7 @@ in # FIXME : this may not cleanup nicely. # This implementation is naive and simple. - init = lib.mkOrder AFTER_DEVICE_INIT '' + init = lib.mkIf cfg.enable (lib.mkOrder AFTER_DEVICE_INIT '' _logger() { # Setup all redirections ${builtins.concatStringsSep "\n" ( @@ -73,6 +73,6 @@ in _logger < ${pipe} > /dev/console 2&1 & printf %s $! > ${pidfile} exec >${pipe} 2>&1 - ''; + ''); }; }