diff options
author | Bob Gilligan <gilligan@vyatta.com> | 2011-12-29 14:22:09 -0800 |
---|---|---|
committer | Bob Gilligan <gilligan@vyatta.com> | 2011-12-29 14:22:09 -0800 |
commit | 0cef83d05e8686e922c41949849c881f4a04ff93 (patch) | |
tree | cdf4e58789cde0afd4324d808a5dc806235e2df7 /scripts | |
parent | 6f8cbd9733f03e901ca0db453198aab184537f37 (diff) | |
download | vyatta-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-x | scripts/vyatta-show-version | 20 |
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"; |