summaryrefslogtreecommitdiff
path: root/scripts/vyos-show-version
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/vyos-show-version')
-rw-r--r--scripts/vyos-show-version6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/vyos-show-version b/scripts/vyos-show-version
index 438f365..be86b73 100644
--- a/scripts/vyos-show-version
+++ b/scripts/vyos-show-version
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright (C) 2016 VyOS maintainers and contributors
#
@@ -74,9 +74,9 @@ version_data['system_arch'] = subprocess.check_output('uname -m', shell=True).st
# Get hypervisor name, if any
-system_type = "physical"
+system_type = "bare metal"
try:
- hypervisor = subprocess.check_output('hvinfo', shell=True).strip()
+ hypervisor = subprocess.check_output('hvinfo 2>/dev/null', shell=True).decode().strip()
system_type = "{0} guest".format(hypervisor)
except subprocess.CalledProcessError:
# hvinfo returns 1 if it cannot detect any hypervisor