diff --git a/DistroInventory.sh b/DistroInventory.sh index ee9a32b..781b6a4 100644 --- a/DistroInventory.sh +++ b/DistroInventory.sh @@ -28,7 +28,7 @@ if $CheckVM; then NAME=$(pct config $ID | grep hostname |sed 's/hostname: //') if [ $STATUS == "running" ]; then OSRELEASE=$(pct exec $ID -- cat /etc/os-release);fi ParseOSRelease - unset OSRELEASE TYPE ID NAME STATUS DISTRO VERSION + unset OSRELEASE ID NAME STATUS DISTRO VERSION done unset TYPE fi @@ -41,7 +41,7 @@ if $CheckCT; then 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"]') ParseOSRelease - unset OSRELEASE TYPE ID NAME STATUS DISTRO VERSION + unset OSRELEASE ID NAME STATUS DISTRO VERSION done unset TYPE fi diff --git a/functions.sh b/functions.sh index 45386b5..bbd7508 100644 --- a/functions.sh +++ b/functions.sh @@ -215,7 +215,7 @@ ParseOSRelease() if [ ! -z "$OSRELEASE" ]; then 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 '"' ) - 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 VERSION="$VERSION ($VERSIONNAME)" fi