Skip to content

Commit

Permalink
Fix UUID generation
Browse files Browse the repository at this point in the history
  • Loading branch information
Corbin Davenport committed May 22, 2020
1 parent 603adbb commit 2f71d90
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,13 @@ _report_bug() {
# Function for Google Analytics
_analytics() {
# Generate random user ID string
UUID=$(uuidgen)
if [ -x "$(command -v uuidgen)" ]; then
UUID=$(uuidgen)
elif [ -f "/proc/sys/kernel/random/uuid" ]; then
UUID=$(cat /proc/sys/kernel/random/uuid)
else
UUID="00000000-0000-0000-0000-000000000000"
fi
# Get exact OS
if [ -d "/mnt/c/Windows" ]; then
REALOS="Windows"
Expand Down

0 comments on commit 2f71d90

Please sign in to comment.