summaryrefslogtreecommitdiffstats
path: root/lib/OpenSLX/DistroUtils/Base.pm
diff options
context:
space:
mode:
authorSebastian Schmelzer2009-08-11 14:06:52 +0200
committerSebastian Schmelzer2009-08-11 14:06:52 +0200
commit1a05343d41fb6d7fb4c3f6a1b2cdc9522bb035ce (patch)
tree63bbf06fba7ee341c0003a70f2f32452577af1b0 /lib/OpenSLX/DistroUtils/Base.pm
parentDo nothing if no partition found ... (diff)
downloadcore-1a05343d41fb6d7fb4c3f6a1b2cdc9522bb035ce.tar.gz
core-1a05343d41fb6d7fb4c3f6a1b2cdc9522bb035ce.tar.xz
core-1a05343d41fb6d7fb4c3f6a1b2cdc9522bb035ce.zip
distroutils update
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@3069 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'lib/OpenSLX/DistroUtils/Base.pm')
-rw-r--r--lib/OpenSLX/DistroUtils/Base.pm52
1 files changed, 44 insertions, 8 deletions
diff --git a/lib/OpenSLX/DistroUtils/Base.pm b/lib/OpenSLX/DistroUtils/Base.pm
index f4eb45c8..f9e6b13b 100644
--- a/lib/OpenSLX/DistroUtils/Base.pm
+++ b/lib/OpenSLX/DistroUtils/Base.pm
@@ -139,7 +139,8 @@ sub _renderHighlevelConfig
$element->{shortname},
uc($element->{shortname}),
$element->{shortname}
- )
+ ),
+ $element->{priority}
);
$tpl = "echo -n \"Starting %s \"\n";
@@ -152,7 +153,8 @@ sub _renderHighlevelConfig
uc($element->{shortname}),
uc($element->{shortname}),
uc($element->{shortname})
- )
+ ),
+ $element->{priority}
);
$tpl = "echo -n \"Shutting down %s\" \n";
@@ -164,7 +166,8 @@ sub _renderHighlevelConfig
$element->{desc},
uc($element->{shortname}),
uc($element->{shortname})
- )
+ ),
+ 10 - $element->{priority}
);
$tpl = "## Stop the service and if this succeeds (i.e. the \n";
@@ -173,7 +176,8 @@ sub _renderHighlevelConfig
$tpl .= "# Remember status and be quiet\n";
$tpl .= "rc_status";
$initFile->addToCase('try-restart',
- $tpl
+ $tpl,
+ $element->{priority}
);
$tpl = "## Stop the service and regardless of whether it was \n";
@@ -183,7 +187,8 @@ sub _renderHighlevelConfig
$tpl .= "# Remember status and be quiet\n";
$tpl .= "rc_status";
$initFile->addToCase('restart',
- $tpl
+ $tpl,
+ $element->{priority}
);
$tpl = "echo -n \"Reload service %s\"\n";
@@ -196,7 +201,8 @@ sub _renderHighlevelConfig
uc($element->{shortname}),
uc($element->{shortname}),
uc($element->{shortname})
- )
+ ),
+ $element->{priority}
);
$tpl = "echo -n \"Checking for service %s\"\n";
@@ -208,11 +214,41 @@ sub _renderHighlevelConfig
$element->{desc},
uc($element->{shortname}),
uc($element->{shortname})
- )
+ ),
+ $element->{priority}
);
}
+ 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}
+ );
+
+ }
}
}
@@ -378,7 +414,7 @@ sub getKernelVersion
}
if (!defined $newestKernelFile) {
- die _tr("unable to pick a kernel-file from path '%s'!", $kernelPath);
+ die; #_tr("unable to pick a kernel-file from path '%s'!", $kernelPath);
}
$newestKernelFile =~ /.*?-([.\-0-9]*)-([a-zA-Z]*?)$/;