diff options
author | Oliver Tappe | 2009-02-07 23:02:20 +0100 |
---|---|---|
committer | Oliver Tappe | 2009-02-07 23:02:20 +0100 |
commit | 42d29658958bc62e8f1b01506252cde064459296 (patch) | |
tree | b58fcf6dd6e3f089be3f230a5da645eca8193176 /os-plugins | |
parent | checked mirrors and removed old ones (diff) | |
download | core-42d29658958bc62e8f1b01506252cde064459296.tar.gz core-42d29658958bc62e8f1b01506252cde064459296.tar.xz core-42d29658958bc62e8f1b01506252cde064459296.zip |
* fixed an uninitialized warning in syslog plugin (which indicated an error)
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2570 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins')
-rw-r--r-- | os-plugins/plugins/syslog/OpenSLX/Distro/Base.pm | 5 | ||||
-rw-r--r-- | os-plugins/plugins/syslog/OpenSLX/OSPlugin/syslog.pm | 14 |
2 files changed, 9 insertions, 10 deletions
diff --git a/os-plugins/plugins/syslog/OpenSLX/Distro/Base.pm b/os-plugins/plugins/syslog/OpenSLX/Distro/Base.pm index dd599404..48ba5eaf 100644 --- a/os-plugins/plugins/syslog/OpenSLX/Distro/Base.pm +++ b/os-plugins/plugins/syslog/OpenSLX/Distro/Base.pm @@ -41,12 +41,11 @@ sub initialize sub runlevelInfo { - my $self = shift; - my $attrs = shift; + my $self = shift; + my $kind = shift; # most distros (well: Debian & Ubuntu) use a different initscript depending # on which version of syslog is installed ('syslogd' or 'syslog-ng') - my $kind = lc($attrs->{'syslog::kind'}); my %nameMap = ( 'syslogd' => 'sysklogd', 'syslog-ng' => 'syslog-ng', diff --git a/os-plugins/plugins/syslog/OpenSLX/OSPlugin/syslog.pm b/os-plugins/plugins/syslog/OpenSLX/OSPlugin/syslog.pm index a37f1d46..937fc468 100644 --- a/os-plugins/plugins/syslog/OpenSLX/OSPlugin/syslog.pm +++ b/os-plugins/plugins/syslog/OpenSLX/OSPlugin/syslog.pm @@ -115,7 +115,7 @@ sub installationPhase $self->{openslxBasePath} = $info->{'openslx-base-path'}; $self->{openslxConfigPath} = $info->{'openslx-config-path'}; $self->{attrs} = $info->{'plugin-attrs'}; - + # We are going to change some of the stage1 attributes during installation # (basically we are filling the ones that are not defined). Since the result # of these changes might change between invocations, we do not want to store @@ -155,10 +155,10 @@ sub installationPhase # start to actually do something - according to current stage1 attributes if ($self->{kind} eq 'syslog-ng') { - $self->_setupSyslogNG(); + $self->_setupSyslogNG($self->{attrs}); } elsif ($self->{kind} eq 'syslogd') { - $self->_setupSyslogd(); + $self->_setupSyslogd($self->{attrs}); } else { die _tr( @@ -185,7 +185,8 @@ sub _setupSyslogNG my $repoPath = $self->{pluginRepositoryPath}; - my $rlInfo = $self->{distro}->runlevelInfo($attrs); + my $kind = lc($attrs->{'syslog::kind'}); + my $rlInfo = $self->{distro}->runlevelInfo($kind); my $conf = unshiftHereDoc(<<" End-of-Here"); #!/bin/ash @@ -247,9 +248,8 @@ sub _setupSyslogd my $repoPath = $self->{pluginRepositoryPath}; - my $rlInfo = $self->{distro}->runlevelInfo($attrs); - - # TODO: implement! + my $kind = lc($attrs->{'syslog::kind'}); + my $rlInfo = $self->{distro}->runlevelInfo($kind); my $conf = unshiftHereDoc(<<' End-of-Here'); #!/bin/ash |