summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2016-03-23 17:51:33 +0100
committerThierry Vignaud <thierry.vignaud@gmail.com>2016-03-23 18:17:12 +0100
commit33564bc9c898189e9770ba2e69498ca2a1d60aaf (patch)
treeb234c162366ab1567dc57f78727c124341b6c79e
parent059439095315cef7bc965108d7edb96dd30b240e (diff)
downloaddrakx-33564bc9c898189e9770ba2e69498ca2a1d60aaf.tar
drakx-33564bc9c898189e9770ba2e69498ca2a1d60aaf.tar.gz
drakx-33564bc9c898189e9770ba2e69498ca2a1d60aaf.tar.bz2
drakx-33564bc9c898189e9770ba2e69498ca2a1d60aaf.tar.xz
drakx-33564bc9c898189e9770ba2e69498ca2a1d60aaf.zip
(isHyperv) move it along other virt functions
-rw-r--r--perl-install/detect_devices.pm22
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?