From b66bca33f7fd4decf159e48c6cc87463d0a6d700 Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Thu, 3 Apr 2008 16:56:03 +0000 Subject: * Instead of passing all known attributes of the current system into each plugin, we now create a hash containing only the attributes relating to that plugin. This should simplify checking the attributes in each plugin. git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1720 95ad53e4-c205-0410-b2fa-d234c58c8868 --- initramfs/OpenSLX/MakeInitRamFS/Engine.pm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'initramfs/OpenSLX/MakeInitRamFS/Engine.pm') diff --git a/initramfs/OpenSLX/MakeInitRamFS/Engine.pm b/initramfs/OpenSLX/MakeInitRamFS/Engine.pm index 482af6b2..43374e9e 100644 --- a/initramfs/OpenSLX/MakeInitRamFS/Engine.pm +++ b/initramfs/OpenSLX/MakeInitRamFS/Engine.pm @@ -750,7 +750,17 @@ sub _calloutToPlugins foreach my $pluginName (@{$self->{'plugins'}}) { my $plugin = OpenSLX::OSPlugin::Roster->getPlugin($pluginName); next if !$plugin; - $plugin->setupPluginInInitramfs($self->{attrs}, $self); + + # create a hash only containing the attributes relating to the + # current plugin + my $allAttrs = $self->{attrs}; + my %pluginAttrs; + for my $attrName (grep { $_ =~ m{^${pluginName}::} } keys %$allAttrs) { + $pluginAttrs{$attrName} = $allAttrs->{$attrName}; + } + + # let plugin setup itself in the initramfs + $plugin->setupPluginInInitramfs(\%pluginAttrs, $self); } return; } -- cgit v1.2.3-55-g7522