diff options
author | Sebastian Schmelzer | 2010-09-02 17:50:49 +0200 |
---|---|---|
committer | Sebastian Schmelzer | 2010-09-02 17:50:49 +0200 |
commit | 416ab8a37f1b07dc9f6c0fb3ff1a8ff2036510b5 (patch) | |
tree | 4715f7d742fec50931017f38fe6ff0a89d4ceccc /os-plugins/plugins/desktop/OpenSLX/Distro/Ubuntu.pm | |
parent | Fix for the problem reported on the list (sed filter forgotten for the (diff) | |
download | core-416ab8a37f1b07dc9f6c0fb3ff1a8ff2036510b5.tar.gz core-416ab8a37f1b07dc9f6c0fb3ff1a8ff2036510b5.tar.xz core-416ab8a37f1b07dc9f6c0fb3ff1a8ff2036510b5.zip |
change dir structure
Diffstat (limited to 'os-plugins/plugins/desktop/OpenSLX/Distro/Ubuntu.pm')
-rw-r--r-- | os-plugins/plugins/desktop/OpenSLX/Distro/Ubuntu.pm | 169 |
1 files changed, 0 insertions, 169 deletions
diff --git a/os-plugins/plugins/desktop/OpenSLX/Distro/Ubuntu.pm b/os-plugins/plugins/desktop/OpenSLX/Distro/Ubuntu.pm deleted file mode 100644 index d222c102..00000000 --- a/os-plugins/plugins/desktop/OpenSLX/Distro/Ubuntu.pm +++ /dev/null @@ -1,169 +0,0 @@ -# Copyright (c) 2006..2010 - OpenSLX GmbH -# -# This program is free software distributed under the GPL version 2. -# See http://openslx.org/COPYING -# -# If you have any feedback please consult http://openslx.org/feedback and -# send your suggestions, praise, or complaints to feedback@openslx.org -# -# General information about OpenSLX can be found at http://openslx.org/ -# ----------------------------------------------------------------------------- -# desktop/OpenSLX/Distro/Ubuntu.pm -# - provides Ubuntu-specific overrides of the distro API for the desktop -# plugin. -# ----------------------------------------------------------------------------- -package desktop::OpenSLX::Distro::Ubuntu; - -use strict; -use warnings; - -use base qw(desktop::OpenSLX::Distro::Base); - -use OpenSLX::Basics; -use OpenSLX::Utils; - -################################################################################ -### interface methods -################################################################################ - -sub GDMPathInfo -{ - my $self = shift; - - my $pathInfo = $self->SUPER::GDMPathInfo(); - - # link gdm.conf-custom instead of gdm.conf - $pathInfo->{config} = '/etc/gdm/custom.conf'; - - return $pathInfo; -} - -sub setupGDMScript -{ - my $self = shift; - my $repoPath = shift; - - my $script = $self->SUPER::setupGDMScript($repoPath); - - my $configFile = $self->GDMPathInfo->{config}; - - $script .= unshiftHereDoc(<<' End-of-Here'); - # cleanup after users Xorg session - sed 's,^#!.*,,' /mnt/etc/gdm/PostSession/Default \ - >/mnt/etc/gdm/PostSession/Default.system - echo -e '#! /bin/sh\n#\n# modified by desktop plugin in Stage3\n#\n - # remove safely any remaining files of the leaving user in /tmp - ( su -c "rm -rf /tmp/*" - echo "$USER files removed by $0" >/tmp/files.removed 2>/dev/null ) & - . /etc/gdm/PostSession/Default.system' >/mnt/etc/gdm/PostSession/Default - chmod a+x /mnt/etc/gdm/PostSession/Default* - # gdm should be started via upstart mechanism - mv /mnt/etc/init.inactive/gdm.conf /mnt/etc/init - echo '/usr/sbin/gdm' >/mnt/etc/X11/default-display-manager - # possible to do this directly? - chroot /mnt update-alternatives --set x-window-manager /usr/bin/metacity - chroot /mnt update-alternatives --set x-session-manager \ - /usr/bin/gnome-session - # gdm does not like AUFS/UnionFS on its var directory - rm -rf /mnt/var/lib/gdm - mkdir -m 1770 /mnt/var/lib/gdm - chown root:gdm /mnt/var/lib/gdm - #sed '/^\\[daemon\\]/ a\\BaseXsession=/etc/gdm/Xsession' \ - # -i /mnt$configFile - End-of-Here - - return $script; -} - -sub KDMPathInfo -{ - my $self = shift; - - my $pathInfo = $self->SUPER::KDMPathInfo(); - - $pathInfo = { - config => "/etc/kde4/kdm/kdmrc", - paths => [ - '/var/lib/kdm', - '/var/run/kdm', - ], - }; - - return $pathInfo; -} - -sub GDMConfigHashForWorkstation -{ - my $self = shift; - - return { - 'chooser' => { - Multicast => 'false', - }, - 'daemon' => { - AutomaticLoginEnable => 'false', - Group => 'gdm', - User => 'gdm', - DefaultSession => 'default.desktop', - }, - 'security' => { - DisallowTCP => 'true', - }, - 'xdmcp' => { - Enable => 'false', - }, - }; -} - -sub KDMConfigHashForWorkstation -{ - my $self = shift; - - my $kdmVer = "4"; - my $configHash = $self->SUPER::KDMConfigHashForWorkstation(); - $configHash->{'General'}->{PidFile} = "/var/run/kdm.pid"; - $configHash->{'General'}->{ServerVTs} = "-7"; - $configHash->{'X-:0-Core'}->{Setup} = "/etc/kde$kdmVer/kdm/Xsetup"; - $configHash->{'X-:0-Core'}->{Startup} = "/etc/kde$kdmVer/kdm/Xstartup"; - $configHash->{'X-:0-Core'}->{Session} = "/etc/kde$kdmVer/kdm/Xsession"; - $configHash->{'X-:0-Core'}->{Reset} = "/etc/kde$kdmVer/kdm/Xreset"; - $configHash->{'X-:0-Core'}->{SessionsDirs} = - '/etc/X11/session,/usr/share/xsessions,/usr/share/apps/kdm/sessions'; - $configHash->{'X-:0-Core'}->{ServerAttempts} = "2"; - - return $configHash; -} - -sub setupKDMScript -{ - my $self = shift; - my $repoPath = shift; - - my $kdmVer = "4"; - my $script = $self->SUPER::setupKDMScript($repoPath); - - $script .= "kdmver=$kdmVer\n"; - $script .= unshiftHereDoc(<<' End-of-Here'); - - # cleanup after users Xorg session - sed 's,^#!.*,,' /mnt/etc/kde$kdmver/kdm/Xreset \ - >/mnt/etc/kde$kdmver/kdm/Xreset.system - echo -e '#! /bin/sh\n#\n# modified by desktop plugin in Stage3\n#\n - # remove safely any remaining files of the leaving user in /tmp - ( su -c "rm -rf /tmp/*" - $USER - echo "$USER files removed by $0" >/tmp/files.removed 2>/dev/null - chmod 0400 /tmp/files.removed ) & - . /etc/kde$kdmver/kdm/Xreset.system' >/mnt/etc/kde$kdmver/kdm/Xreset - chmod a+x /mnt/etc/kde$kdmver/kdm/Xreset* - - mv /mnt/etc/init.inactive/kdm.conf /mnt/etc/init - echo '/usr/bin/kdm' > /mnt/etc/X11/default-display-manager - chroot /mnt update-alternatives --set x-window-manager /usr/bin/kwin - chroot /mnt update-alternatives --set x-session-manager \ - /usr/bin/startkde - End-of-Here - - return $script; -} - -1; |