This is primarily to satisfy the expectations of various scripts that os_*
variables are defined, and will result in a distro similar to "xs6.1.0-59235p"
Fixes bug 1211001
Change-Id: I951e1eb3a5e25f4d8773a11b15cf38157b6492fe
... | ... |
@@ -387,8 +387,9 @@ GetOSVersion() { |
387 | 387 |
# CentOS release 5.5 (Final) |
388 | 388 |
# CentOS Linux release 6.0 (Final) |
389 | 389 |
# Fedora release 16 (Verne) |
390 |
+ # XenServer release 6.2.0-70446c (xenenterprise) |
|
390 | 391 |
os_CODENAME="" |
391 |
- for r in "Red Hat" CentOS Fedora; do |
|
392 |
+ for r in "Red Hat" CentOS Fedora XenServer; do |
|
392 | 393 |
os_VENDOR=$r |
393 | 394 |
if [[ -n "`grep \"$r\" /etc/redhat-release`" ]]; then |
394 | 395 |
ver=`sed -e 's/^.* \(.*\) (\(.*\)).*$/\1\|\2/' /etc/redhat-release` |
... | ... |
@@ -451,6 +452,8 @@ function GetDistro() { |
451 | 451 |
elif [[ "$os_VENDOR" =~ (Red Hat) || "$os_VENDOR" =~ (CentOS) ]]; then |
452 | 452 |
# Drop the . release as we assume it's compatible |
453 | 453 |
DISTRO="rhel${os_RELEASE::1}" |
454 |
+ elif [[ "$os_VENDOR" =~ (XenServer) ]]; then |
|
455 |
+ DISTRO="xs$os_RELEASE" |
|
454 | 456 |
else |
455 | 457 |
# Catch-all for now is Vendor + Release + Update |
456 | 458 |
DISTRO="$os_VENDOR-$os_RELEASE.$os_UPDATE" |