diff options
author | Sebastian Schmelzer | 2009-08-11 19:21:45 +0200 |
---|---|---|
committer | Sebastian Schmelzer | 2009-08-11 19:21:45 +0200 |
commit | 62b370dea8406f300678d11a30ddca3410079bfb (patch) | |
tree | fb1c26c70d69dcf127260b9a0a6e01337c17a15a /os-plugins/plugins/bootsplash/OpenSLX/OSPlugin/bootsplash.pm | |
parent | One link to mkdosfs is enough ... (diff) | |
download | core-62b370dea8406f300678d11a30ddca3410079bfb.tar.gz core-62b370dea8406f300678d11a30ddca3410079bfb.tar.xz core-62b370dea8406f300678d11a30ddca3410079bfb.zip |
distroutils demo code
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@3079 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins/plugins/bootsplash/OpenSLX/OSPlugin/bootsplash.pm')
-rw-r--r-- | os-plugins/plugins/bootsplash/OpenSLX/OSPlugin/bootsplash.pm | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/os-plugins/plugins/bootsplash/OpenSLX/OSPlugin/bootsplash.pm b/os-plugins/plugins/bootsplash/OpenSLX/OSPlugin/bootsplash.pm index da820230..db18f1a4 100644 --- a/os-plugins/plugins/bootsplash/OpenSLX/OSPlugin/bootsplash.pm +++ b/os-plugins/plugins/bootsplash/OpenSLX/OSPlugin/bootsplash.pm @@ -23,6 +23,7 @@ use File::Path; use OpenSLX::Basics; use OpenSLX::Utils; +use OpenSLX::DistroUtils; sub new { @@ -120,9 +121,37 @@ sub installationPhase $self->{pluginRepositoryPath} = $info->{'plugin-repo-path'}; $self->{openslxBasePath} = $info->{'openslx-base-path'}; + my $splashyBinPath = "$self->{openslxBasePath}/lib/plugins/bootsplash/files/bin"; my $pluginRepoPath = "$self->{pluginRepositoryPath}"; + + my $initFile = newInitFile(); + my $do_stop = unshiftHereDoc(<<" End-of-Here"); + /opt/openslx/plugin-repo/bootsplash/bin/splashy shutdown + sleep 1 + /opt/openslx/plugin-repo/bootsplash/bin/splashy_update \\ + "progress 100\" 2>/dev/null + End-of-Here + + # add helper function to initfile + # first parameter name of the function + # second parameter content of the function + $initFile->addFunction('do_stop', $do_stop); + + # place a call of the helper function in the stop block + # of the init file + # first parameter name of the function + # second parameter name of the block + $initFile->addFunctionCall('do_stop', 'stop'); + + my $distro = (split('-',$self->{'os-plugin-engine'}->distroName()))[0]; + + # write initfile to filesystem + spitFile( + "$pluginRepoPath/bootsplash.halt", + getInitFileForDistro($initFile, ucfirst($distro)) + ); # copy splashy(_update) into plugin-repo folder mkpath("$pluginRepoPath/bin"); @@ -148,6 +177,7 @@ sub removalPhase return; } + sub copyRequiredFilesIntoInitramfs { my $self = shift; |