diff options
author | James Davidson <james.davidson@vyatta.com> | 2013-02-06 11:55:15 -0800 |
---|---|---|
committer | James Davidson <james.davidson@vyatta.com> | 2013-02-06 12:11:05 -0800 |
commit | 898fada2dfd3072239f168372fc13985dd62514f (patch) | |
tree | 843cb3c406d725cb3fad413776016eb5e3c66e6d | |
parent | 5aefb45ced1a75b4cc8ecdc598d413cb201f67f1 (diff) | |
download | vyatta-op-898fada2dfd3072239f168372fc13985dd62514f.tar.gz vyatta-op-898fada2dfd3072239f168372fc13985dd62514f.zip |
Display virt-brand version file if running in VM
-rwxr-xr-x | scripts/vyatta-show-version | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/vyatta-show-version b/scripts/vyatta-show-version index fa4de0d..f7a3ee9 100755 --- a/scripts/vyatta-show-version +++ b/scripts/vyatta-show-version @@ -13,7 +13,7 @@ # General Public License for more details. # # This code was originally developed by Vyatta, Inc. -# Portions created by Vyatta are Copyright (C) 2005, 2006, 2007 Vyatta, Inc. +# Portions created by Vyatta are Copyright (C) 2005-2013 Vyatta, Inc. # All Rights Reserved. # # Author: Rick Balocca @@ -182,6 +182,10 @@ my %options = ( # # main # +my $hv = `/opt/vyatta/sbin/hypervisor_vendor`; +if (defined($hv) && $hv ne "") { + $versionfile .= "-virt"; +} print(&echo_file($versionfile)); print(&echo_file($buildfile)); @@ -203,7 +207,6 @@ if (defined($booted) && $booted ne "") { } print "Boot via: $booted\n"; -my $hv = `/opt/vyatta/sbin/hypervisor_vendor`; if (defined($hv) && $hv ne "") { chomp $hv; print "Hypervisor: $hv\n"; |