diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2016-03-23 17:51:33 +0100 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2016-03-23 18:17:12 +0100 |
commit | 33564bc9c898189e9770ba2e69498ca2a1d60aaf (patch) | |
tree | b234c162366ab1567dc57f78727c124341b6c79e /perl-install | |
parent | 059439095315cef7bc965108d7edb96dd30b240e (diff) | |
download | drakx-33564bc9c898189e9770ba2e69498ca2a1d60aaf.tar drakx-33564bc9c898189e9770ba2e69498ca2a1d60aaf.tar.gz drakx-33564bc9c898189e9770ba2e69498ca2a1d60aaf.tar.bz2 drakx-33564bc9c898189e9770ba2e69498ca2a1d60aaf.tar.xz drakx-33564bc9c898189e9770ba2e69498ca2a1d60aaf.zip |
(isHyperv) move it along other virt functions
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/detect_devices.pm | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm index 4740cbe91..48eb3e68f 100644 --- a/perl-install/detect_devices.pm +++ b/perl-install/detect_devices.pm @@ -1416,17 +1416,6 @@ sub isServer() { || (any { $_->{'model name'} =~ /(Xeon|Opteron)/i } getCPUs()); } -=item isHyperv() - -Are we running under Hyper-V hypervisor? - -=cut - -sub isHyperv() { - dmidecode_category('System')->{Manufacturer} =~ /Microsoft Corporation/i - && dmidecode_category('System')->{'Product Name'} =~ /Virtual Machine/i; -} - sub BIGMEM() { arch() !~ /x86_64/ && $> == 0 && dmi_detect_memory() > 4 * 1024; } @@ -1482,6 +1471,17 @@ sub virt_technology() { $tech ||= chomp_(run_program::get_stdout('systemd-detect-virt')); } +=item isHyperv() + +Are we running under Hyper-V hypervisor? + +=cut + +sub isHyperv() { + dmidecode_category('System')->{Manufacturer} =~ /Microsoft Corporation/i + && dmidecode_category('System')->{'Product Name'} =~ /Virtual Machine/i; +} + =item is_virtualbox() Are we running under VirtualBox hypervisor? |