From beab87b40820270616d0f2995ab0295ee3f567a4 Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Wed, 17 Dec 2008 22:59:06 +0000 Subject: .. git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2434 95ad53e4-c205-0410-b2fa-d234c58c8868 --- os-plugins/plugins/desktop/OpenSLX/Distro/Base.pm | 54 +++++++++++++++++++--- .../plugins/x11vnc/OpenSLX/OSPlugin/x11vnc.pm | 2 +- 2 files changed, 49 insertions(+), 7 deletions(-) (limited to 'os-plugins') diff --git a/os-plugins/plugins/desktop/OpenSLX/Distro/Base.pm b/os-plugins/plugins/desktop/OpenSLX/Distro/Base.pm index 9184733f..d88c8d1e 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 isPackInstalled('gdm') ? 'gdm' - : isPackInstalled('kdm') ? 'kdm' - : isPackInstalled('xdm') ? 'xdm' : undef; + return $self->isGDMInstalled() ? 'gdm' + : $self->isKDMInstalled() ? 'kdm' + : $self->isXDMInstalled() ? 'xdm' : undef; } sub getDefaultDesktopKind @@ -56,9 +56,16 @@ sub getDefaultDesktopKind my $self = shift; # the default implementation prefers GNOME over KDE over XFCE - return isPackInstalled('gnome-session') ? 'gnome' - : isPackInstalled('startkde') ? 'kde' - : isPackInstalled('startxfce') ? 'xfce' : undef; + return $self->isGNOMEInstalled() ? 'gnome' + : $self->isKDEInstalled() ? 'kde' + : $self->isXFCEInstalled() ? 'xfce' : undef; +} + +sub isGNOMEInstalled +{ + my $self = shift; + + return isInPath('gnome-session'); } sub installGNOME @@ -72,6 +79,13 @@ sub installGNOME return 1; } +sub isGDMInstalled +{ + my $self = shift; + + return isInPath('gdm'); +} + sub installGDM { my $self = shift; @@ -210,6 +224,13 @@ sub GDMConfigHashForChooser return $configHash; } +sub isKDEInstalled +{ + my $self = shift; + + return isInPath('startkde'); +} + sub installKDE { my $self = shift; @@ -221,6 +242,13 @@ sub installKDE return 1; } +sub isKDMInstalled +{ + my $self = shift; + + return isInPath('kdm'); +} + sub installKDM { my $self = shift; @@ -355,6 +383,13 @@ sub KDMConfigHashForChooser return $configHash; } +sub isXFCEInstalled +{ + my $self = shift; + + return isInPath('startxfce4'); +} + sub installXFCE { my $self = shift; @@ -366,6 +401,13 @@ sub installXFCE return 1; } +sub isXDMInstalled +{ + my $self = shift; + + return isInPath('xdm'); +} + sub installXDM { my $self = shift; diff --git a/os-plugins/plugins/x11vnc/OpenSLX/OSPlugin/x11vnc.pm b/os-plugins/plugins/x11vnc/OpenSLX/OSPlugin/x11vnc.pm index d240384f..e86bbfcf 100644 --- a/os-plugins/plugins/x11vnc/OpenSLX/OSPlugin/x11vnc.pm +++ b/os-plugins/plugins/x11vnc/OpenSLX/OSPlugin/x11vnc.pm @@ -189,7 +189,7 @@ 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')) { + if (!isInPath('x11vnc')) { $self->{'distro'}->installPackages( $self->{'os-plugin-engine'}->getInstallablePackagesForSelection('x11vnc') ); -- cgit v1.2.3-55-g7522