armbian-next: logging: reinit logging after processing cmdline parameters

- so `DEBUG=yes` actually works
This commit is contained in:
Ricardo Pardini
2023-01-13 04:02:18 +01:00
parent 62bc394738
commit ef36016ee4
3 changed files with 9 additions and 6 deletions

View File

@@ -28,6 +28,9 @@ function cli_entrypoint() {
apply_cmdline_params_to_env "early" # which uses ARMBIAN_PARSED_CMDLINE_PARAMS
# From here on, no more ${1} or stuff. We've parsed it all into ARMBIAN_PARSED_CMDLINE_PARAMS or ARMBIAN_NON_PARAM_ARGS and ARMBIAN_COMMAND.
# Re-initialize logging, to take into account the new environment after parsing cmdline params.
logging_init
declare -a -g ARMBIAN_CONFIG_FILES=() # fully validated, complete paths to config files.
declare -g ARMBIAN_COMMAND_HANDLER="" ARMBIAN_COMMAND="" ARMBIAN_COMMAND_VARS="" # only valid command and handler will ever be set here.
declare -g ARMBIAN_HAS_UNKNOWN_ARG="no" # if any unknown params, bomb.