1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2025-01-02 04:47:13 +03:00

initrd-logger: enable = false will disable it completely.

This commit is contained in:
Samuel Dionne-Riel 2018-06-18 22:11:54 -04:00
parent 0d17ae2279
commit ca0ef47b71
2 changed files with 4 additions and 4 deletions

View File

@ -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})
}
'';
'');
};
}

View File

@ -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
'';
'');
};
}