Skip to content

Commit

Permalink
Update dietpi-globals
Browse files Browse the repository at this point in the history
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      |
```
  • Loading branch information
JappeHallunken authored and MichaIng committed Jul 7, 2024
1 parent b1df1e9 commit 5946838
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions dietpi/func/dietpi-globals
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 <<EOF > "$fp_error_report"
[[ ${G_PROGRAM_NAME,,} == 'dietpi-'* ]] && echo -e "\e[41m
\e[41m
---------------------------------------------------------------------
- DietPi has encountered an error -
Expand Down Expand Up @@ -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 :
Expand All @@ -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')
Expand Down

0 comments on commit 5946838

Please sign in to comment.