From 5946838b9b3245fe782f3ac46727d25ec1789265 Mon Sep 17 00:00:00 2001 From: JappeHallunken Date: Wed, 31 Jan 2024 20:30:20 +0100 Subject: [PATCH] Update dietpi-globals final working version Users can now call G_BUG_REPORT which outputs necessary info for the forums troubleshout template in the format of: ``` root@DietPi:~# G_BUG_REPORT #### Required Information - DietPi version | v9.0.2 (MichaIng/master) - Distro version | bookworm (ID=7,RASPBIAN=0) - Kernel version | `Linux DietPi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux` - Architecture | `arm64` - SBC model | RPi 3 Model B (aarch64) (ID=3) - Image creator | - Pre-image | ``` --- dietpi/func/dietpi-globals | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index 5e6c35c1e3..5bf8d700da 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -817,7 +817,7 @@ $grey───────────────────────── #### Required Information - DietPi version | $dietpi_version - Distro version | $G_DISTRO_NAME (ID=$G_DISTRO${G_RASPBIAN:+,RASPBIAN=$G_RASPBIAN}) -- Kernel version | \`$(uname -a)\` +- Kernel version | \`$(uname -a)\` - Architecture | \`$(dpkg --print-architecture)\` - SBC model | $G_HW_MODEL_NAME (ID=$G_HW_MODEL) - Image creator | $image_creator @@ -904,9 +904,9 @@ EOF fi local dietpi_version="v$G_DIETPI_VERSION_CORE.$G_DIETPI_VERSION_SUB.$G_DIETPI_VERSION_RC ($G_GITOWNER/$G_GITBRANCH)" - local error_details=$(generate_error_details "$dietpi_version") + local error_details=$(G_BUG_REPORT) - cat < "$fp_error_report" + [[ ${G_PROGRAM_NAME,,} == 'dietpi-'* ]] && echo -e "\e[41m \e[41m --------------------------------------------------------------------- - DietPi has encountered an error - @@ -936,8 +936,7 @@ $error_details \`\`\` $log_content \`\`\`\e[41m ----------------------------------------------------------------------\e[0m -EOF +---------------------------------------------------------------------\e[0m" > "$fp_error_report" # Enter error handler menu loop in interactive mode [[ $G_INTERACTIVE == 1 ]] && while : @@ -948,7 +947,8 @@ EOF # Allow to open DietPi-Config if this error was not produced within DietPi-Config pgrep -cf 'dietpi-config' &> /dev/null || G_WHIP_MENU_ARRAY+=('DietPi-Config' ': Edit network, APT/NTP mirror settings etc') G_WHIP_MENU_ARRAY+=('Open subshell' ': Open a subshell to investigate or solve the issue') - # Allow to send bug report, if it was produced by one of our scripts + + # Allow to send bug report, if it was produced by one of our scripts [[ ${G_PROGRAM_NAME,,} == 'dietpi-'* && $G_PROGRAM_NAME != 'DietPi-Installer' ]] && G_WHIP_MENU_ARRAY+=('Send report' ': Uploads bugreport containing system info to DietPi') G_WHIP_MENU_ARRAY+=('' '●─ Devs only ') G_WHIP_MENU_ARRAY+=('Change command' ': Adjust and rerun the command')