diff options
| author | Oliver Tappe | 2008-03-24 16:42:47 +0100 |
|---|---|---|
| committer | Oliver Tappe | 2008-03-24 16:42:47 +0100 |
| commit | 7c25c7600d56ab930a9a7a111bab53f98eabc9df (patch) | |
| tree | 6a850e3b15eb14b770c6d19aac7be34d1bf4fd89 /os-plugins/OpenSLX/OSPlugin | |
| parent | Load configuration within the vmware runlevel script ... (diff) | |
| download | core-7c25c7600d56ab930a9a7a111bab53f98eabc9df.tar.gz core-7c25c7600d56ab930a9a7a111bab53f98eabc9df.tar.xz core-7c25c7600d56ab930a9a7a111bab53f98eabc9df.zip | |
* removed 'precedence'-attribute and made it part of the general plugin info -
it makes no sense to have this configurable by the user
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1682 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins/OpenSLX/OSPlugin')
| -rw-r--r-- | os-plugins/OpenSLX/OSPlugin/Base.pm | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/os-plugins/OpenSLX/OSPlugin/Base.pm b/os-plugins/OpenSLX/OSPlugin/Base.pm index cede0bce..9d4f6657 100644 --- a/os-plugins/OpenSLX/OSPlugin/Base.pm +++ b/os-plugins/OpenSLX/OSPlugin/Base.pm @@ -105,6 +105,25 @@ Returns a hash-ref with administrative information about this plugin (what does it do and how does it relate to other plugins). Every plugin needs to provide this method and return the information about itself. +The returned hash-ref must include at least the following entries: + +=over + +=item B<description> + +Explains the purpose of this plugins. + +=item B<precedence> + +Specifies the execution precedence of this plugin with respect to all other +plugins (plugins with lower precedences will be started before the ones with +a higher precedence). + +Valid values range from 0-99. If your plugin does not have any requirements +in this context, just specify the default value '50'. + +=back + =cut sub getInfo @@ -133,17 +152,6 @@ The returned hash-ref must include at least the following entries: Indicates whether or not this plugin is active (1 for active, 0 for inactive). -=item B<I<plugin-name>::precedence> - -Specifies the execution precedence of this plugin with respect to all other -plugins (plugins with lower precedences will be started before the ones with -a higher precedence). - -Valid values range from 0-99. If your plugin does not have any requirements -in this context, just specify the default value '50'. - -=back - =cut sub getAttrInfo @@ -155,7 +163,6 @@ sub getAttrInfo # of slxconfig. return { # attribute 'active' is mandatory for all plugins - # attribute 'precedence' is mandatory for all plugins }; } @@ -316,7 +323,7 @@ suggestAdditionalKernelModules() and maybe copyRequiredFilesIntoInitramfs(). sub setupPluginInInitramfs { my $self = shift; - my $attrs = shift; + my $attrs = shift; my $makeInitRamFSEngine = shift; my $pluginName = $self->{name}; @@ -326,8 +333,7 @@ sub setupPluginInInitramfs my $initHooksPath = "$buildPath/etc/init-hooks"; # copy runlevel script - my $precedence - = sprintf('%02d', $attrs->{"${pluginName}::precedence"}); + my $precedence = sprintf('%02d', $self->getInfo()->{precedence}); my $scriptName = "$pluginSrcPath/$pluginName/XX_${pluginName}.sh"; my $targetName = "$pluginInitdPath/${precedence}_${pluginName}.sh"; if (-e $scriptName) { |
