summaryrefslogtreecommitdiffstats
path: root/os-plugins
diff options
context:
space:
mode:
authorOliver Tappe2008-02-02 23:39:34 +0100
committerOliver Tappe2008-02-02 23:39:34 +0100
commit0076eb4a3f8979de8bc99a6befab280e5d78eb4a (patch)
tree4b9a857ea70fd25e69a82cbca9dfc764d2ac905d /os-plugins
parent* added support for creating only the initramfs for the systems that (diff)
downloadcore-0076eb4a3f8979de8bc99a6befab280e5d78eb4a.tar.gz
core-0076eb4a3f8979de8bc99a6befab280e5d78eb4a.tar.xz
core-0076eb4a3f8979de8bc99a6befab280e5d78eb4a.zip
* fixed bugs that stopped new-style initramfs from working
* added support to new-style initramfs generator for integrating the active plugins into the initramfs With these fixes, I have been able to boot a cloned suse-10.2 into KDM with both bootsplash- and displaymanager-theme working. git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1510 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins')
-rw-r--r--os-plugins/OpenSLX/OSPlugin/Base.pm12
-rw-r--r--os-plugins/OpenSLX/OSPlugin/Roster.pm20
-rw-r--r--os-plugins/plugins/theme/OpenSLX/OSPlugin/theme.pm56
3 files changed, 88 insertions, 0 deletions
diff --git a/os-plugins/OpenSLX/OSPlugin/Base.pm b/os-plugins/OpenSLX/OSPlugin/Base.pm
index 34b551d9..4b370375 100644
--- a/os-plugins/OpenSLX/OSPlugin/Base.pm
+++ b/os-plugins/OpenSLX/OSPlugin/Base.pm
@@ -128,3 +128,15 @@ sub postRemovalPhase
my $pluginRepositoryPath = shift;
my $pluginTempPath = shift;
}
+
+sub copyRequiredFilesIntoInitramfs
+{ # called by config-demuxer in order to give the plugin a chance to copy
+ # all required files from the vendor-OS into the initramfs.
+ # N.B.: Only files that are indeed required by the initramfs should be
+ # copied here, i.e. files that are needed *before* the root-fs
+ # has been mounted!
+ my $self = shift;
+ my $targetPath = shift;
+ my $attrs = shift;
+ my $makeInitRamFSEngine = shift;
+}
diff --git a/os-plugins/OpenSLX/OSPlugin/Roster.pm b/os-plugins/OpenSLX/OSPlugin/Roster.pm
index 832b0bb3..791865f1 100644
--- a/os-plugins/OpenSLX/OSPlugin/Roster.pm
+++ b/os-plugins/OpenSLX/OSPlugin/Roster.pm
@@ -17,6 +17,7 @@ use strict;
use warnings;
use OpenSLX::Basics;
+use Storable qw(dclone);
my %plugins;
@@ -39,6 +40,25 @@ sub getAvailablePlugins
return \%pluginInfo;
}
+=item C<getPlugin()>
+
+Returns an instance of the plugin with the given name
+
+=cut
+
+sub getPlugin
+{
+ my $class = shift;
+ my $pluginName = shift;
+
+ $class->_init() if !%plugins;
+
+ my $plugin = $plugins{$pluginName};
+ return if !$plugin;
+
+ return dclone($plugin);
+}
+
=item C<getPluginAttrInfo()>
Returns a hash that contains info about the attributes support by the
diff --git a/os-plugins/plugins/theme/OpenSLX/OSPlugin/theme.pm b/os-plugins/plugins/theme/OpenSLX/OSPlugin/theme.pm
index c6635ccb..7de608af 100644
--- a/os-plugins/plugins/theme/OpenSLX/OSPlugin/theme.pm
+++ b/os-plugins/plugins/theme/OpenSLX/OSPlugin/theme.pm
@@ -111,4 +111,60 @@ sub getAttrInfo
};
}
+sub copyRequiredFilesIntoInitramfs
+{
+ my $self = shift;
+ my $targetPath = shift;
+ my $attrs = shift;
+ my $makeInitRamFSEngine = shift;
+
+ my $themeDir = "$openslxConfig{'base-path'}/share/themes";
+ my $splashTheme = $attrs->{'theme::splash'} || '';
+ if ($splashTheme) {
+ my $splashThemeDir = "$themeDir/$splashTheme/bootsplash";
+ if (-d $splashThemeDir) {
+ my $splashyPath = "$openslxConfig{'base-path'}/share/splashy";
+ $makeInitRamFSEngine->addCMD(
+ "cp -p $splashyPath/* $targetPath/bin/"
+ );
+ $makeInitRamFSEngine->addCMD(
+ "mkdir -p $targetPath/etc/splashy"
+ );
+ $makeInitRamFSEngine->addCMD(
+ "cp -a $splashThemeDir/* $targetPath/etc/splashy/"
+ );
+ }
+ }
+ else {
+ $splashTheme = '<none>';
+ }
+
+ my $displayManagerTheme = $attrs->{'theme::displaymanager'} || '';
+ if ($displayManagerTheme) {
+ my $displayManagerThemeDir
+ = "$themeDir/$displayManagerTheme/displaymanager";
+ if (-d $displayManagerThemeDir) {
+ $makeInitRamFSEngine->addCMD(
+ "mkdir -p $targetPath/usr/share/themes"
+ );
+ $makeInitRamFSEngine->addCMD(
+ "cp -a $displayManagerThemeDir $targetPath/usr/share/themes/"
+ );
+ }
+ }
+ else {
+ $displayManagerTheme = '<none>';
+ }
+
+ vlog(
+ 0,
+ _tr(
+ "theme-plugin: bootsplash=%s displaymanager=%s",
+ $splashTheme, $displayManagerTheme
+ )
+ );
+
+ return;
+}
+
1;