summaryrefslogtreecommitdiffstats
path: root/os-plugins/plugins/xserver/OpenSLX/OSPlugin/xserver.pm
diff options
context:
space:
mode:
authorBastian Wissler2009-02-26 18:13:26 +0100
committerBastian Wissler2009-02-26 18:13:26 +0100
commit2d0394696fea9aa61a7e4ee68d252740d56cfae4 (patch)
tree2ee54aacec7401fa2e4cedd5d3bcb0499fe72467 /os-plugins/plugins/xserver/OpenSLX/OSPlugin/xserver.pm
parentvmchooser: (diff)
downloadcore-2d0394696fea9aa61a7e4ee68d252740d56cfae4.tar.gz
core-2d0394696fea9aa61a7e4ee68d252740d56cfae4.tar.xz
core-2d0394696fea9aa61a7e4ee68d252740d56cfae4.zip
xserver plugin:
* fixed wrong usage of unlink function git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2646 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins/plugins/xserver/OpenSLX/OSPlugin/xserver.pm')
-rw-r--r--os-plugins/plugins/xserver/OpenSLX/OSPlugin/xserver.pm25
1 files changed, 21 insertions, 4 deletions
diff --git a/os-plugins/plugins/xserver/OpenSLX/OSPlugin/xserver.pm b/os-plugins/plugins/xserver/OpenSLX/OSPlugin/xserver.pm
index e4c63736..26dfc395 100644
--- a/os-plugins/plugins/xserver/OpenSLX/OSPlugin/xserver.pm
+++ b/os-plugins/plugins/xserver/OpenSLX/OSPlugin/xserver.pm
@@ -229,15 +229,16 @@ sub installationPhase
my $binDrivers = 0;
my $engine = $self->{'os-plugin-engine'};
+ # removeLinks is to remove Links to the files
+ # otherwise some wrong files are created
+ # this can happed here
+ $self->removeLinks();
if ($attrs->{'xserver::nvidia'} == 1 || $attrs->{'xserver::ati'} == 1 ) {
copyFile("$pluginFilesPath/ubuntu-gfx-install.sh", "$installationPath");
copyFile("$pluginFilesPath/suse-gfx-install.sh", "$installationPath");
copyFile("$pluginFilesPath/ubuntu-8.10-gfx-install.sh", "$installationPath");
- # removeLinks is to remove Links to the files
- # otherwise some wrong files are created
- $self->removeLinks();
$binDrivers = 1;
}
if ($attrs->{'xserver::ati'} == 1) {
@@ -415,7 +416,23 @@ sub removeLinks
symlink "/usr/lib/libGL.so.1.2", "/usr/lib/libGL.so.1";
symlink "/usr/lib/libGL.so.1.2", "/usr/lib/libGL.so";
- my $number = unlink @linkedFiles;
+
+ foreach my $file (@linkedFiles) {
+ chomp($file);
+ unlink $file;
+ }
+
+ # this should not print any file at all ;-(
+ my @files = `find $instFolders -lname "$divertFolder*" -o -lname "$pluginFolder*" `;
+ if ( $#files > 0 ) {
+ print "Links were not removed properly! Exiting!\n";
+ my $bla;
+ foreach (@files) {
+ chomp($bla = $_);
+ print $bla;
+ }
+ exit(1);
+ }
return;
}