summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/OpenSLX/Utils.pm8
-rw-r--r--os-plugins/plugins/desktop/OpenSLX/Distro/Base.pm12
-rw-r--r--os-plugins/plugins/syslog/OpenSLX/OSPlugin/syslog.pm10
-rw-r--r--os-plugins/plugins/x11vnc/OpenSLX/OSPlugin/x11vnc.pm6
4 files changed, 17 insertions, 19 deletions
diff --git a/lib/OpenSLX/Utils.pm b/lib/OpenSLX/Utils.pm
index 9686a152..8b3754bf 100644
--- a/lib/OpenSLX/Utils.pm
+++ b/lib/OpenSLX/Utils.pm
@@ -36,6 +36,7 @@ $VERSION = 1.01;
hostIs64Bit
getAvailableBusyboxApplets
grabLock
+ isPackInstalled pathOf isInPath
);
=head1 NAME
@@ -666,7 +667,6 @@ Returns the path of a binary it is installed in.
sub pathOf
{
- my $self = shift;
my $binary = shift;
return qx{which $binary 2>/dev/null};
@@ -680,10 +680,9 @@ Returns whether a binary is found.
sub isInPath
{
- my $self = shift;
my $binary = shift;
- my $path = $self->pathOf($binary);
+ my $path = pathOf($binary);
return $path ? 1 : 0;
}
@@ -697,9 +696,8 @@ the package mechanism of the given distribution!?
sub isPackInstalled
{
- my $self = shift;
my $pack = shift;
- return $self->isInPath($pack);
+ return isInPath($pack);
}
1;
diff --git a/os-plugins/plugins/desktop/OpenSLX/Distro/Base.pm b/os-plugins/plugins/desktop/OpenSLX/Distro/Base.pm
index b8e966b8..9184733f 100644
--- a/os-plugins/plugins/desktop/OpenSLX/Distro/Base.pm
+++ b/os-plugins/plugins/desktop/OpenSLX/Distro/Base.pm
@@ -46,9 +46,9 @@ sub getDefaultDesktopManager
my $self = shift;
# the default implementation prefers GDM over KDM over XDM
- return $self->isPackInstalled('gdm') ? 'gdm'
- : $self->isPackInstalled('kdm') ? 'kdm'
- : $self->isPackInstalled('xdm') ? 'xdm' : undef;
+ return isPackInstalled('gdm') ? 'gdm'
+ : isPackInstalled('kdm') ? 'kdm'
+ : isPackInstalled('xdm') ? 'xdm' : undef;
}
sub getDefaultDesktopKind
@@ -56,9 +56,9 @@ sub getDefaultDesktopKind
my $self = shift;
# the default implementation prefers GNOME over KDE over XFCE
- return $self->isPackInstalled('gnome-session') ? 'gnome'
- : $self->isPackInstalled('startkde') ? 'kde'
- : $self->isPackInstalled('startxfce') ? 'xfce' : undef;
+ return isPackInstalled('gnome-session') ? 'gnome'
+ : isPackInstalled('startkde') ? 'kde'
+ : isPackInstalled('startxfce') ? 'xfce' : undef;
}
sub installGNOME
diff --git a/os-plugins/plugins/syslog/OpenSLX/OSPlugin/syslog.pm b/os-plugins/plugins/syslog/OpenSLX/OSPlugin/syslog.pm
index 52b18032..9e88ff66 100644
--- a/os-plugins/plugins/syslog/OpenSLX/OSPlugin/syslog.pm
+++ b/os-plugins/plugins/syslog/OpenSLX/OSPlugin/syslog.pm
@@ -66,7 +66,7 @@ sub getAttrInfo
'syslog::kind' => {
applies_to_vendor_os => 1,
description => unshiftHereDoc(<<' End-of-Here'),
- kind of syslog to use (syslogd-ng or old-style syslog)
+ kind of syslog to use \(syslogd-ng or old-style syslog\)
End-of-Here
content_regex => undef,
content_descr => 'allowed: syslogd-ng, syslog',
@@ -127,16 +127,16 @@ sub installationPhase
my $engine = $self->{'os-plugin-engine'};
if ($self->{kind} eq 'syslog-ng' &&
- !$self->{distro}->isPackInstalled('syslog-ng')) {
+ !isPackInstalled('syslog-ng')) {
$engine->installPackages(
- $self->{engine}->getInstallablePackagesForSelection('syslog-ng')
+ $engine->getInstallablePackagesForSelection('syslog-ng')
);
}
# not sure if we ever should setup this service
if ($self->{kind} eq 'syslogd' &&
- !$self->{distro}->isPackInstalled('syslog')) {
+ !isPackInstalled('syslog')) {
$engine->installPackages(
- $self->{engine}->getInstallablePackagesForSelection('syslog')
+ $engine->getInstallablePackagesForSelection('syslog')
);
}
diff --git a/os-plugins/plugins/x11vnc/OpenSLX/OSPlugin/x11vnc.pm b/os-plugins/plugins/x11vnc/OpenSLX/OSPlugin/x11vnc.pm
index 716cc3f7..d240384f 100644
--- a/os-plugins/plugins/x11vnc/OpenSLX/OSPlugin/x11vnc.pm
+++ b/os-plugins/plugins/x11vnc/OpenSLX/OSPlugin/x11vnc.pm
@@ -189,9 +189,9 @@ sub installationPhase
# should we distinguish between the two different packages!?
# libvnc should be part of the xorg package!? (so no check needed)
- if (!$self->{distro}->isPackInstalled('x11vnc')) {
- $self->{distro}->installPackages(
- $self->{engine}->getInstallablePackagesForSelection('x11vnc')
+ if (!$self->{'distro'}->isPackInstalled('x11vnc')) {
+ $self->{'distro'}->installPackages(
+ $self->{'os-plugin-engine'}->getInstallablePackagesForSelection('x11vnc')
);
} else {
vlog(3, "x11vnc is already installed");