From 898fada2dfd3072239f168372fc13985dd62514f Mon Sep 17 00:00:00 2001 From: James Davidson Date: Wed, 6 Feb 2013 11:55:15 -0800 Subject: Display virt-brand version file if running in VM --- scripts/vyatta-show-version | 7 +++++-- 1 file 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"; -- cgit v1.2.3