DistroInventory added windows support
Fixed bugs in os-Release file parsing
This commit is contained in:
@@ -213,9 +213,9 @@ UpgradeRelease () {
|
||||
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)
|
||||
DISTRO=$(printf "$OSRELEASE" | awk -F= '$1=="ID" { print $2 ;}')
|
||||
VERSION=$(printf "$OSRELEASE" | awk -F= '$1=="VERSION_ID" { print $2 ;}' |tr -d '"')
|
||||
VERSIONNAME=$(printf "$OSRELEASE" | awk -F= '$1=="VERSION_CODENAME" { print $2 ;}')
|
||||
if [ ! -z "$VERSIONNAME" ]; then
|
||||
VERSION="$VERSION ($VERSIONNAME)"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user