diff options
author | Oliver Tappe | 2008-05-26 21:22:00 +0200 |
---|---|---|
committer | Oliver Tappe | 2008-05-26 21:22:00 +0200 |
commit | b943b09340c3e3c59f83823946ceeb3e453b3e52 (patch) | |
tree | cfbb91e9b11a909b3ffc785cb9c18fc68a06d1fc /os-plugins/plugins/vmchooser/OpenSLX/OSPlugin/vmchooser.pm | |
parent | Fixed non-working installation & deinstallation of plugins into/from the '<<<... (diff) | |
download | core-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/vmchooser/OpenSLX/OSPlugin/vmchooser.pm')
-rw-r--r-- | os-plugins/plugins/vmchooser/OpenSLX/OSPlugin/vmchooser.pm | 49 |
1 files changed, 10 insertions, 39 deletions
diff --git a/os-plugins/plugins/vmchooser/OpenSLX/OSPlugin/vmchooser.pm b/os-plugins/plugins/vmchooser/OpenSLX/OSPlugin/vmchooser.pm index 778e419c..2db3c315 100644 --- a/os-plugins/plugins/vmchooser/OpenSLX/OSPlugin/vmchooser.pm +++ b/os-plugins/plugins/vmchooser/OpenSLX/OSPlugin/vmchooser.pm @@ -65,56 +65,27 @@ sub getAttrInfo sub installationPhase -{ # called while chrooted to the vendor-OS root in order to give the plugin - # a chance to install required files into the vendor-OS. +{ my $self = shift; + my $info = shift; - my $pluginRepositoryPath = shift; - # The folder where the stage1-plugin should store all files - # required by the corresponding stage3 runlevel script. - # As this method is being executed while chrooted into the vendor-OS, - # this path is relative to that root (i.e. directly usable). - my $pluginTempPath = shift; - # A temporary playground that will be cleaned up automatically. - # As this method is being executed while chrooted into the vendor-OS, - # this path is relative to that root (i.e. directly usable). - my $openslxPath = shift; - # the openslx base path bind-mounted into the chroot (/mnt/openslx) - - # for this example plugin, we simply create two files: - #spitFile("$pluginRepositoryPath/right", "(-;\n"); - #spitFile("$pluginRepositoryPath/left", ";-)\n"); - - # Some plugins have to copy files from their plugin folder into the - # vendor-OS. In order to make this possible while chrooted, the host's - # /opt/openslx folder will be mounted to /mnt/openslx in the vendor-OS. - # get our own name: - my $pluginName = $self->{'name'}; - - - # get our own base path: - my $pluginBasePath = "/mnt/openslx/lib/plugins/$pluginName/files"; - + my $pluginRepoPath = $info->{'plugin-repo-path'}; + my $openslxBasePath = $info->{'openslx-base-path'}; + # copy all needed files now: - #system( "bash") ; + my $pluginName = $self->{'name'}; + my $pluginBasePath = "$openslxBasePath/lib/plugins/$pluginName/files"; foreach my $file ( qw( vmchooser ) ) { - copyFile("$pluginBasePath/$file", "$pluginRepositoryPath/"); + copyFile("$pluginBasePath/$file", "$pluginRepoPath/"); } - # name of current os - # $self->{'os-plugin-engine'}->{'vendor-os-name'} - return; } sub removalPhase -{ # called while chrooted to the vendor-OS root in order to give the plugin - # a chance to uninstall no longer required files from the vendor-OS. +{ my $self = shift; - my $pluginRepositoryPath = shift; - # the repository folder, relative to the vendor-OS root - my $pluginTempPath = shift; - # the temporary folder, relative to the vendor-OS root + my $info = shift; return; } |