summaryrefslogtreecommitdiffstats
path: root/os-plugins/plugins/x11vnc/OpenSLX/OSPlugin/x11vnc.pm
diff options
context:
space:
mode:
authorOliver Tappe2008-05-26 21:22:00 +0200
committerOliver Tappe2008-05-26 21:22:00 +0200
commitb943b09340c3e3c59f83823946ceeb3e453b3e52 (patch)
treecfbb91e9b11a909b3ffc785cb9c18fc68a06d1fc /os-plugins/plugins/x11vnc/OpenSLX/OSPlugin/x11vnc.pm
parentFixed non-working installation & deinstallation of plugins into/from the '<<<... (diff)
downloadcore-b943b09340c3e3c59f83823946ceeb3e453b3e52.tar.gz
core-b943b09340c3e3c59f83823946ceeb3e453b3e52.tar.xz
core-b943b09340c3e3c59f83823946ceeb3e453b3e52.zip
* reworked plugin-API concerning the way the parameters are passed into
installationPhase() and removalPhase() - now we use a hash as the amount of parameters has become too large * adjusted all plugins to these API change * now not only the openslx base path, but the openslx config path is bind mounted into the vendor-OS chroot, such that plugins can check the available local configuration extensions git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1803 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins/plugins/x11vnc/OpenSLX/OSPlugin/x11vnc.pm')
-rw-r--r--os-plugins/plugins/x11vnc/OpenSLX/OSPlugin/x11vnc.pm48
1 files changed, 23 insertions, 25 deletions
diff --git a/os-plugins/plugins/x11vnc/OpenSLX/OSPlugin/x11vnc.pm b/os-plugins/plugins/x11vnc/OpenSLX/OSPlugin/x11vnc.pm
index 16bf4fe1..37dc14bd 100644
--- a/os-plugins/plugins/x11vnc/OpenSLX/OSPlugin/x11vnc.pm
+++ b/os-plugins/plugins/x11vnc/OpenSLX/OSPlugin/x11vnc.pm
@@ -176,40 +176,39 @@ sub getAttrInfo
sub installationPhase
{
my $self = shift;
- my $pluginRepositoryPath = shift;
- my $pluginTempPath = shift;
- my $openslxPath = shift;
+ my $info = shift;
+
+ my $pluginRepositoryPath = $info->{'plugin-repo-path'};
+ my $pluginTempPath = $info->{'plugin-temp-path'};
+ my $openslxBasePath = $info->{'openslx-base-path'};
# get path of files we need to install
- my $pluginFilesPath = "$openslxPath/lib/plugins/$self->{'name'}/files";
+ my $pluginFilesPath = "$openslxBasePath/lib/plugins/$self->{'name'}/files";
# copy all needed files now
copyFile("$pluginFilesPath/x11vnc", "/etc/init.d");
vlog(3, "install init file");
if ( !-x "/usr/bin/x11vnc" ) {
- # let's install x11vnc
- if ( $self->{'os-plugin-engine'}->{'vendor-os-name'} =~ m/(debian|ubuntu)/i ) {
- my $cmd = "aptitude -y install x11vnc";
- vlog(3, "executing: $cmd");
- if (slxsystem($cmd)) {
- die _tr(
- "unable to execute shell-cmd\n\t%s", $cmd
- );
+ # let's install x11vnc
+ my $vendorOSName = $self->{'os-plugin-engine'}->{'vendor-os-name'};
+ if ( $vendorOSName =~ m/(debian|ubuntu)/i ) {
+ my $cmd = "aptitude -y install x11vnc";
+ vlog(3, "executing: $cmd");
+ if (slxsystem($cmd)) {
+ die _tr("unable to execute shell-cmd\n\t%s", $cmd);
+ }
}
- }
- if ( $self->{'os-plugin-engine'}->{'vendor-os-name'} =~ m/suse/i ) {
- # PLEASE TEST THIS!!!
- my $cmd = "zypper -n in x11vnc";
- vlog(3, "executing: $cmd");
- if (slxsystem($cmd)) {
- die _tr(
- "unable to execute shell-cmd\n\t%s", $cmd
- );
+ if ( $vendorOSName =~ m/suse/i ) {
+ # PLEASE TEST THIS!!!
+ my $cmd = "zypper -n in x11vnc";
+ vlog(3, "executing: $cmd");
+ if (slxsystem($cmd)) {
+ die _tr("unable to execute shell-cmd\n\t%s", $cmd);
+ }
}
- }
} else {
- vlog(3, "x11vnc is already installed");
+ vlog(3, "x11vnc is already installed");
}
}
@@ -217,8 +216,7 @@ sub installationPhase
sub removalPhase
{
my $self = shift;
- my $pluginRepositoryPath = shift;
- my $pluginTempPath = shift;
+ my $info = shift;
}
1;