Fixed Typo's in DistroInventory.sh and relead functions

This commit is contained in:
2023-11-19 23:05:14 +01:00
parent ea8cf5b3d7
commit 1ad843d62a
2 changed files with 3 additions and 3 deletions

View File

@@ -28,7 +28,7 @@ if $CheckVM; then
NAME=$(pct config $ID | grep hostname |sed 's/hostname: //') NAME=$(pct config $ID | grep hostname |sed 's/hostname: //')
if [ $STATUS == "running" ]; then OSRELEASE=$(pct exec $ID -- cat /etc/os-release);fi if [ $STATUS == "running" ]; then OSRELEASE=$(pct exec $ID -- cat /etc/os-release);fi
ParseOSRelease ParseOSRelease
unset OSRELEASE TYPE ID NAME STATUS DISTRO VERSION unset OSRELEASE ID NAME STATUS DISTRO VERSION
done done
unset TYPE unset TYPE
fi fi
@@ -41,7 +41,7 @@ if $CheckCT; then
NAME=$(qm config $ID | grep name |sed 's/name: //') NAME=$(qm config $ID | grep name |sed 's/name: //')
if [ $STATUS == "running" ]; then OSRELEASE=$(qm guest exec 2002 -- cat /etc/os-release |jq -r '.["out-data"]') if [ $STATUS == "running" ]; then OSRELEASE=$(qm guest exec 2002 -- cat /etc/os-release |jq -r '.["out-data"]')
ParseOSRelease ParseOSRelease
unset OSRELEASE TYPE ID NAME STATUS DISTRO VERSION unset OSRELEASE ID NAME STATUS DISTRO VERSION
done done
unset TYPE unset TYPE
fi fi

View File

@@ -215,7 +215,7 @@ ParseOSRelease()
if [ ! -z "$OSRELEASE" ]; then if [ ! -z "$OSRELEASE" ]; then
DISTRO=$(printf "$OSRELEASE" | awk -F= '$1=="ID" { print $2 ;}' /etc/os-release) DISTRO=$(printf "$OSRELEASE" | awk -F= '$1=="ID" { print $2 ;}' /etc/os-release)
VERSION=$(printf "$OSRELEASE" | awk -F= '$1=="VERSION_ID" { print $2 ;}' /etc/os-release |tr -d '"' ) VERSION=$(printf "$OSRELEASE" | awk -F= '$1=="VERSION_ID" { print $2 ;}' /etc/os-release |tr -d '"' )
VERSIONNAME=$(printf "$OSRELEASE" | -- awk -F= '$1=="VERSION_CODENAME" { print $2 ;}' /etc/os-release) VERSIONNAME=$(printf "$OSRELEASE" | awk -F= '$1=="VERSION_CODENAME" { print $2 ;}' /etc/os-release)
if [ ! -z "$VERSIONNAME" ]; then if [ ! -z "$VERSIONNAME" ]; then
VERSION="$VERSION ($VERSIONNAME)" VERSION="$VERSION ($VERSIONNAME)"
fi fi