mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 10:43:55 +00:00
get just the OS pretty name for Dan
This commit is contained in:
parent
6fa00e7cc8
commit
5d7ef9281f
1 changed files with 8 additions and 3 deletions
|
@ -90,9 +90,14 @@ get_distro_attributes() {
|
||||||
|
|
||||||
local distro_attribute
|
local distro_attribute
|
||||||
for distro_attribute in "${distro_info[@]}"; do
|
for distro_attribute in "${distro_info[@]}"; do
|
||||||
# Display the information with the ${INFO} icon
|
# Display the information with the ${INFO} icon (we need just the OS PRETTY_NAME)
|
||||||
# No need to show the support URLs so they are grepped out
|
pretty_name_key=$(echo "${distro_attribute}" | grep "PRETTY_NAME" | cut -d '=' -f1)
|
||||||
echo " ${INFO} ${distro_attribute}" | grep -v "_URL" | tr -d '"'
|
if [[ "${pretty_name_key}" == "PRETTY_NAME" ]]; then
|
||||||
|
PRETTY_NAME=$(echo "${distro_attribute}" | grep "PRETTY_NAME" | cut -d '=' -f2- | tr -d '"')
|
||||||
|
echo " ${INFO} ${PRETTY_NAME}"
|
||||||
|
else
|
||||||
|
:
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
# Set the IFS back to what it was
|
# Set the IFS back to what it was
|
||||||
IFS="$OLD_IFS"
|
IFS="$OLD_IFS"
|
||||||
|
|
Loading…
Reference in a new issue