updated on Tue Jan 24 12:00:22 UTC 2012
[aur-mirror.git] / vmware-server / vmserver.patch
blobffd644049ecef2809250960358088a1aefa93402
1 diff -urp vmware-server-distrib/bin/vm-support vmware-server-distrib.bu/bin/vm-support
2 --- vmware-server-distrib/bin/vm-support 2009-10-21 03:48:34.000000000 +0200
3 +++ vmware-server-distrib.bu/bin/vm-support 2010-02-08 11:23:34.000000000 +0100
4 @@ -457,7 +457,7 @@ done
5 runcmd "echo vm-support version: $VER" "/tmp/vm-support-version.$$.txt"
6 runcmd "lspci -H1 -M" "/tmp/lspci1.$$.txt"
7 runcmd "lspci -H1 -M -vn" "/tmp/lspci2.$$.txt"
8 -runcmd "/sbin/lsmod" "/tmp/modules.$$.txt"
9 +runcmd "/bin/lsmod" "/tmp/modules.$$.txt"
10 runcmd "uname -a" "/tmp/uname.$$.txt"
11 runcmd "df" "/tmp/df.$$.txt"
12 runcmd "cat /etc/issue" "/tmp/issue.$$.txt"
13 diff -urp vmware-server-distrib/bin/vmware-config.pl vmware-server-distrib.bu/bin/vmware-config.pl
14 --- vmware-server-distrib/bin/vmware-config.pl 2009-10-21 03:48:34.000000000 +0200
15 +++ vmware-server-distrib.bu/bin/vmware-config.pl 2010-02-08 11:27:18.000000000 +0100
16 @@ -4285,75 +4285,6 @@ sub configure_module {
17 my $name = shift;
18 my $mod_dir;
20 - if (defined($gDBAnswer{'ALT_MOD_DIR'})
21 - && ($gDBAnswer{'ALT_MOD_DIR'} eq 'yes')) {
22 - $mod_dir = db_get_answer('LIBDIR') . '/modules.new';
23 - } else {
24 - $mod_dir = db_get_answer('LIBDIR') . '/modules';
25 - }
27 - if ($gOption{'compile'} == 1
28 - && can_build_module($name) eq 'yes') {
29 - db_add_answer('BUILDR_' . $name, 'yes');
30 - } else {
31 - my @mod_list;
33 - @mod_list = get_suitable_modules($mod_dir . '/binary');
34 - while ($#mod_list > -1) {
35 - my $candidate = shift(@mod_list);
36 - my $modversion = shift(@mod_list);
38 - # Note: When using the force flag,
39 - # Non-versioned modules can load into a versioned kernel.
40 - # Versioned modules can load into a non-versioned kernel.
41 - #
42 - # Consequently, it is only safe to use the force flag if _both_ the
43 - # kernel and the module are versioned.
44 - # This is not always the case as demonstrated by bug 18371.
45 - #
46 - # I would stop using force flag immediately, it does nothing good.
48 - if (try_module($name,
49 - $mod_dir . '/binary/' . $candidate . '/objects/'
50 - . $name . '.o',
51 - ($gSystem{'versioned'} eq 'yes')
52 - && ($modversion eq 'yes'), 1)) {
53 - print wrap('The ' . $candidate . ' - ' . $name . ' module '
54 - . 'loads perfectly into the ' . 'running kernel.' . "\n\n", 0);
55 - return 'yes';
56 - }
57 - }
59 - if ($gOption{'prebuilt'} == 1) {
60 - db_add_answer('BUILDR_' . $name, 'no');
61 - print wrap('None of the pre-built ' . $name . ' modules for '
62 - . vmware_product_name() . ' is suitable for your '
63 - . 'running kernel.' . "\n\n", 0);
64 - return 'no';
65 - }
67 - # No more building modules for 'ws' unless forced to.
68 - if (vmware_product() eq 'ws' && !$gOption{'compile'}) {
69 - # don't restart services at the end, no modules are installed
70 - $gOption{'skip-stop-start'} = 1;
71 - return 'yes';
72 - }
74 - if (can_build_module($name) ne "yes"
75 - || get_persistent_answer('None of the pre-built ' . $name . ' modules for '
76 - . vmware_product_name() . ' is suitable '
77 - . 'for your running kernel. Do you want this '
78 - . 'program to try to build the ' . $name
79 - . ' module for your system (you need to have a '
80 - . 'C compiler installed on your system)?',
81 - 'BUILDR_' . $name, 'yesno', 'yes') eq 'no') {
82 - return 'no';
83 - }
84 - }
86 - if (build_module($name, $mod_dir . '/source') eq 'no') {
87 - return 'no';
88 - }
89 return 'yes';
92 @@ -11217,19 +11148,19 @@ sub main {
93 # this call MUST come after setupSymlinks (if setupSymlinks is deemed necessary)
94 system_info();
96 - if ($gOption{'tools-switch'} == 0) {
97 - my @modules = non_vmware_modules_installed();
98 - if (scalar(@modules) > 0) {
99 - my $osVersion = direct_command(shell_string($gHelper{'uname'}) . ' -r');
100 - chomp($osVersion);
101 - error("The following VMware kernel modules have been found on your " .
102 - "system that were not installed by the VMware Installer. " .
103 - "Please remove them then run this installer again.\n\n" .
104 - join("\n", @modules) . "\n\n" .
105 - "I.e. - 'rm /lib/modules/" . $osVersion .
106 - "/misc/<ModuleName>.{o,ko}'\n\n");
109 +# if ($gOption{'tools-switch'} == 0) {
110 +# my @modules = non_vmware_modules_installed();
111 +# if (scalar(@modules) > 0) {
112 +# my $osVersion = direct_command(shell_string($gHelper{'uname'}) . ' -r');
113 +# chomp($osVersion);
114 +# error("The following VMware kernel modules have been found on your " .
115 +# "system that were not installed by the VMware Installer. " .
116 +# "Please remove them then run this installer again.\n\n" .
117 +# join("\n", @modules) . "\n\n" .
118 +# "I.e. - 'rm /lib/modules/" . $osVersion .
119 +# "/misc/<ModuleName>.{o,ko}'\n\n");
120 +# }
121 +# }
123 if (vmware_product() eq 'ws' && $gOption{'make-all-net'}) {
124 make_all_net();
125 @@ -11284,7 +11215,7 @@ sub main {
126 error('Please shut down any running VMs and run this script again.' .
127 "\n\n");
128 } else {
129 - if (system(shell_string(db_get_answer('INITSCRIPTSDIR') . '/vmware')
130 + if (system(shell_string('/etc/rc.d' . '/vmware')
131 . ' stop')) {
132 error('Unable to stop services for ' . vmware_product_name() . "\n\n");
134 @@ -11322,16 +11253,16 @@ sub main {
137 if (vmware_product() ne 'server') {
138 - configure_mon();
139 +# configure_mon();
140 configure_vmci();
141 configure_vsock();
142 - configure_pp();
143 +# configure_pp();
145 if (vmware_product() eq 'wgs') {
146 configure_net();
149 - build_vmnet();
150 +# build_vmnet();
153 if (isDesktopProduct()) {
154 @@ -11436,7 +11367,7 @@ sub main {
155 db_save();
156 # Then start VMware's services
157 if (!$gOption{'skip-stop-start'}) {
158 - system(shell_string(db_get_answer('INITSCRIPTSDIR') . '/vmware') . ' start');
159 + system(shell_string('/etc/rc.d' . '/vmware') . ' start');
160 print "\n";
163 diff -urp vmware-server-distrib/bin/vmware-uninstall.pl vmware-server-distrib.bu/bin/vmware-uninstall.pl
164 --- vmware-server-distrib/bin/vmware-uninstall.pl 2009-10-21 03:48:27.000000000 +0200
165 +++ vmware-server-distrib.bu/bin/vmware-uninstall.pl 2010-02-08 11:23:33.000000000 +0100
166 @@ -3327,7 +3327,7 @@ sub uninstall {
169 if (defined($gDBAnswer{'INITSCRIPTSDIR'})
170 - && db_file_in(db_get_answer('INITSCRIPTSDIR') . $service_name)) {
171 + && file_name_exist(db_get_answer('INITSCRIPTSDIR') . $service_name)) {
173 if ((isDesktopProduct()) || (isServerProduct())) {
174 # Check that there are no VMs active else the server will fail to stop.
175 @@ -3345,7 +3345,7 @@ sub uninstall {
176 my $status;
177 # Stop the services
178 print wrap('Stopping services for ' . vmware_product_name() . "\n\n", 0);
179 - $status = system(shell_string(db_get_answer('INITSCRIPTSDIR')
180 + $status = system(shell_string('/etc/rc.d'
181 . $service_name) . ' stop') >> 8;
182 if ($status) {
183 if ($status == 2) {
184 @@ -4082,7 +4082,7 @@ sub uninstall_superserver {
186 # Restart the inetd service
187 sub restart_inetd {
188 - my $inetd_restart = db_get_answer('INITSCRIPTSDIR') . '/inetd';
189 + my $inetd_restart = '/etc/rc.d' . '/inetd';
190 if (-e $inetd_restart) {
191 if (!system(shell_string($inetd_restart) . ' restart')) {
192 return;
193 @@ -4119,7 +4119,7 @@ sub uninstall_inetd {
195 #Restart xinetd
196 sub restart_xinetd {
197 - my $xinetd_restart = db_get_answer('INITSCRIPTSDIR') . '/xinetd';
198 + my $xinetd_restart = '/etc/rc.d' . '/xinetd';
199 if (-e $xinetd_restart) {
200 if (!system(shell_string($xinetd_restart) . ' restart')) {
201 return;
202 diff -urp vmware-server-distrib/installer/services.sh vmware-server-distrib.bu/installer/services.sh
203 --- vmware-server-distrib/installer/services.sh 2009-10-21 03:48:36.000000000 +0200
204 +++ vmware-server-distrib.bu/installer/services.sh 2010-02-08 11:21:57.000000000 +0100
205 @@ -729,14 +729,14 @@ vmware_inVM() {
207 vmmonUseCount() {
208 # Beware of module dependancies here. An exact match is important
209 - /sbin/lsmod | awk 'BEGIN {n = 0;} {if ($1 == "'"$driver"'") n = $3;} END {print n;}'
210 + /bin/lsmod | awk 'BEGIN {n = 0;} {if ($1 == "'"$driver"'") n = $3;} END {print n;}'
213 # Is a given module loaded?
214 isLoaded() {
215 local module="$1"
217 - /sbin/lsmod | awk 'BEGIN {n = "no";} {if ($1 == "'"$module"'") n = "yes";} END {print n;}'
218 + /bin/lsmod | awk 'BEGIN {n = "no";} {if ($1 == "'"$module"'") n = "yes";} END {print n;}'
221 # Build a Linux kernel integer version
222 @@ -786,7 +786,7 @@ vmware_run_vimsh_cmd() {
225 vmware_load_module() {
226 - /sbin/insmod -s -f "/lib/modules/`uname -r`/misc/$1.o" || exit 1
227 + /sbin/insmod -s -f "/lib/modules/`uname -r`/misc/$1.ko" || exit 1
228 return 0
231 diff -urp vmware-server-distrib/lib/net-services.sh vmware-server-distrib.bu/lib/net-services.sh
232 --- vmware-server-distrib/lib/net-services.sh 2009-10-21 03:48:27.000000000 +0200
233 +++ vmware-server-distrib.bu/lib/net-services.sh 2010-02-08 11:21:58.000000000 +0100
234 @@ -689,7 +689,7 @@ ipv4_broadcast() {
235 isLoaded() {
236 local module="$1"
238 - /sbin/lsmod | awk 'BEGIN {n = "no";} {if ($1 == "'"$module"'") n = "yes";} END {print n;}'
239 + /bin/lsmod | awk 'BEGIN {n = "no";} {if ($1 == "'"$module"'") n = "yes";} END {print n;}'
242 # Check if there is an IP route for a given subnet via a given interface