summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorBob Gilligan <gilligan@vyatta.com>2011-12-29 14:22:09 -0800
committerBob Gilligan <gilligan@vyatta.com>2011-12-29 14:22:09 -0800
commit0cef83d05e8686e922c41949849c881f4a04ff93 (patch)
treecdf4e58789cde0afd4324d808a5dc806235e2df7 /scripts
parent6f8cbd9733f03e901ca0db453198aab184537f37 (diff)
downloadvyatta-op-0cef83d05e8686e922c41949849c881f4a04ff93.tar.gz
vyatta-op-0cef83d05e8686e922c41949849c881f4a04ff93.zip
Bugfix 7473: Display hardware model, S/N and UUID if available.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/vyatta-show-version20
1 files changed, 20 insertions, 0 deletions
diff --git a/scripts/vyatta-show-version b/scripts/vyatta-show-version
index c8a315d..fa4de0d 100755
--- a/scripts/vyatta-show-version
+++ b/scripts/vyatta-show-version
@@ -209,6 +209,26 @@ if (defined($hv) && $hv ne "") {
print "Hypervisor: $hv\n";
}
+
+my $plat_model = `sudo /usr/sbin/dmidecode -s system-product-name`;
+chomp $plat_model;
+my $plat_sn = `sudo /usr/sbin/dmidecode -s system-serial-number`;
+chomp $plat_sn;
+my $plat_uuid = `sudo /usr/sbin/dmidecode -s system-uuid`;
+chomp $plat_uuid;
+
+if (defined $plat_model && $plat_model ne "" && $plat_model ne " ") {
+ print "HW model: $plat_model\n"
+}
+
+if (defined $plat_sn && $plat_sn ne "" && $plat_sn ne " ") {
+ print "HW S/N: $plat_sn\n"
+}
+
+if (defined $plat_uuid && $plat_uuid ne "" && $plat_uuid ne " ") {
+ print "HW UUID: $plat_uuid\n"
+}
+
my $uptime = `uptime`;
if (defined $uptime && $uptime ne "") {
print "Uptime: $uptime\n";