From: VMware, Inc <> Date: Thu, 2 Aug 2012 06:48:14 +0000 (-0700) Subject: Add an entry for 'oracle linux' in distroArray. X-Git-Tag: 2012.10.14-874563~72 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e591ee426370f1f106798d093ffa03e8f5a2b284;p=thirdparty%2Fopen-vm-tools.git Add an entry for 'oracle linux' in distroArray. The 'guestinfo' plugin in VMware Tools is responsible for retrieving details about the guest (like guest family, guest id, guest fullname etc.). The 'guestinfo' plugin uses HostinfoOSData to retrieve the data about the guest OS. HostinfoOSData() uses 'lsb_release' package to reteive the details. If the 'lsb_release' command fails for some reason, then /etc/*-release files are parsed to retrieve the necessary information. There is a specific list of /etc/*-release files that are parsed. We don't have an entry for 'Oracle Linux'. We need to add an entry for '/etc/oracle-release' file in the list. In 'Oracle Linux' guests, both files '/etc/redhat_release' and /etc/oracle_release' exist. So, we need to add the new entry in the code before the 'redhat' entry. Otherwise, '/etc/redhat-release' is parsed first and improper information is retrieved. Signed-off-by: Dmitry Torokhov --- diff --git a/open-vm-tools/lib/misc/hostinfoPosix.c b/open-vm-tools/lib/misc/hostinfoPosix.c index 8fa18cc0a..06d8fd16c 100644 --- a/open-vm-tools/lib/misc/hostinfoPosix.c +++ b/open-vm-tools/lib/misc/hostinfoPosix.c @@ -169,6 +169,7 @@ typedef struct distro_info { } DistroInfo; static const DistroInfo distroArray[] = { + {"OracleLinux", "/etc/oracle-release"}, {"RedHat", "/etc/redhat-release"}, {"RedHat", "/etc/redhat_version"}, {"Sun", "/etc/sun-release"},