From 1a05343d41fb6d7fb4c3f6a1b2cdc9522bb035ce Mon Sep 17 00:00:00 2001 From: Sebastian Schmelzer Date: Tue, 11 Aug 2009 12:06:52 +0000 Subject: distroutils update git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@3069 95ad53e4-c205-0410-b2fa-d234c58c8868 --- lib/OpenSLX/DistroUtils/Suse.pm | 52 ++++++++++++++++++++++++++++++++--------- 1 file changed, 41 insertions(+), 11 deletions(-) (limited to 'lib/OpenSLX/DistroUtils/Suse.pm') diff --git a/lib/OpenSLX/DistroUtils/Suse.pm b/lib/OpenSLX/DistroUtils/Suse.pm index 3c370489..8a41c2eb 100644 --- a/lib/OpenSLX/DistroUtils/Suse.pm +++ b/lib/OpenSLX/DistroUtils/Suse.pm @@ -19,6 +19,18 @@ use Switch; use base qw(OpenSLX::DistroUtils::Base); + +sub _renderCasePrefix +{ + return "rc_reset\n"; +} + +sub _renderFooter +{ + return "rc_exit\n"; +} + + sub _renderHighlevelConfig { my $self = shift; my $initFile = shift; @@ -120,10 +132,38 @@ sub _renderHighlevelConfig { ); + } + case 'function' { + my $tpl; + $tpl = "%s () { \n"; + $tpl .= "%s"; + $tpl .= "\n}\n"; + $initFile->addToBlock('functions', + sprintf( + $tpl, + $element->{name}, + $element->{script} + ) + ); + + } + case 'functionCall' { + my $tpl; + $tpl = "%s %s\n"; + #$tpl .= "%s\n "; + $initFile->addToCase($element->{block}, + sprintf( + $tpl, + $element->{function}, + $element->{parameters}, + "" + ), + $element->{priority} + ); + } } } - } sub _getInitsystemIncludes @@ -131,14 +171,4 @@ sub _getInitsystemIncludes return ". /etc/rc.status\n\n"; } -sub _renderCasePrefix -{ - return "rc_reset\n"; -} - -sub _renderFooter -{ - return "rc_exit\n"; -} - 1; \ No newline at end of file -- cgit v1.2.3-55-g7522