]> git.pld-linux.org Git - packages/VMware-server.git/commitdiff
- try modules from kernel dir first for pre-packaged modules
authorElan Ruusamäe <glen@pld-linux.org>
Mon, 7 Apr 2008 13:18:39 +0000 (13:18 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    VMware-server-config-kernel.patch -> 1.1

VMware-server-config-kernel.patch [new file with mode: 0644]

diff --git a/VMware-server-config-kernel.patch b/VMware-server-config-kernel.patch
new file mode 100644 (file)
index 0000000..353f04b
--- /dev/null
@@ -0,0 +1,38 @@
+--- vmware-server-distrib/bin/vmware-config.pl 2007-11-09 14:22:03.000000000 +0200
++++ vmware-server-distrib/bin/vmware-config.pl 2008-04-07 15:57:41.590945387 +0300
+@@ -3774,7 +3776,7 @@
+     $mod_dir = db_get_answer('LIBDIR') . '/modules';
+   }
+-  if (($name eq 'vmxnet') and (not is64BitKernel()) and ($gOption{'kernel_version'} eq '')) {
++  if (0 && ($name eq 'vmxnet') and (not is64BitKernel()) and ($gOption{'kernel_version'} eq '')) {
+     # Figure out the correct network script.
+     my $init_dir = db_get_answer('INITSCRIPTSDIR');
+     my $network_path = find_first_exist("$init_dir/network",
+@@ -3820,6 +3822,26 @@
+     print wrap('Trying to find a suitable ' . $name
+                . ' module for your running kernel.' . "\n\n", 0);
++
++    my $kmod_dir = $cKernelModuleDir . '/'. $gSystem{'uts_release'};
++    if (-d $kmod_dir) {
++      if (not open(MODULESDEP, $kmod_dir .'/modules.dep')) {
++         error("Unable to open kernel module dependency file\n.");
++      }
++
++      my $found;
++      my $match = qr/\Q$name\E\.ko(?:\.gz)?:$/;
++      while (<MODULESDEP>) {
++         if ($match) {
++            $found = 'yes';
++            last;
++         }
++      }
++      close(MODULESDEP);
++
++      return $found if $found;
++    }
++
+     @mod_list = get_suitable_modules($mod_dir . '/binary');
+     while ($#mod_list > -1) {
+       my $candidate = shift(@mod_list);
This page took 0.04078 seconds and 4 git commands to generate.