]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Add an entry for 'oracle linux' in distroArray.
authorVMware, Inc <>
Thu, 2 Aug 2012 06:48:14 +0000 (23:48 -0700)
committerDmitry Torokhov <dtor@vmware.com>
Thu, 2 Aug 2012 18:08:34 +0000 (11:08 -0700)
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 <dtor@vmware.com>
open-vm-tools/lib/misc/hostinfoPosix.c

index 8fa18cc0a6c659389b1e7e9ee29773925648ee19..06d8fd16c3ef5d5c04b2b31a13d8e07f027d166a 100644 (file)
@@ -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"},