From 416ab8a37f1b07dc9f6c0fb3ff1a8ff2036510b5 Mon Sep 17 00:00:00 2001 From: Sebastian Schmelzer Date: Thu, 2 Sep 2010 17:50:49 +0200 Subject: change dir structure --- src/os-plugins/OpenSLX/OSPlugin/Base.pm | 631 +++++++++++++++ src/os-plugins/OpenSLX/OSPlugin/Engine.pm | 857 +++++++++++++++++++++ src/os-plugins/OpenSLX/OSPlugin/Roster.pm | 213 +++++ .../bootsplash/OpenSLX/OSPlugin/bootsplash.pm | 253 ++++++ src/os-plugins/plugins/bootsplash/XX_bootsplash.sh | 56 ++ .../plugins/bootsplash/files/lib/libglib-2.0.so.0 | Bin 0 -> 822344 bytes .../plugins/bootsplash/files/lib/libsplashy.so.1 | Bin 0 -> 18948 bytes .../bootsplash/files/lib/libsplashycnf.so.1 | Bin 0 -> 7804 bytes .../plugins/bootsplash/files/sbin/splashy | Bin 0 -> 54215 bytes .../plugins/bootsplash/files/sbin/splashy_config | Bin 0 -> 66416 bytes .../plugins/bootsplash/files/sbin/splashy_update | Bin 0 -> 9611 bytes .../bootsplash/files/themes/openslx/blank.ttf | 0 .../bootsplash/files/themes/openslx/openslx.png | Bin 0 -> 89872 bytes .../bootsplash/files/themes/openslx/theme.xml | 138 ++++ .../bootsplash/files/usr/lib/libdirect-1.2.so.9 | Bin 0 -> 80552 bytes .../bootsplash/files/usr/lib/libdirectfb-1.2.so.9 | Bin 0 -> 474652 bytes .../plugins/bootsplash/files/usr/lib/libmagic.so.1 | Bin 0 -> 105596 bytes .../init-hooks/05-have-kernelvars/bootsplash.sh | 18 + .../init-hooks/10-nw-if-config/bootsplash.sh | 1 + .../init-hooks/20-nw-bridge-config/bootsplash.sh | 1 + .../init-hooks/25-have-ip-config/bootsplash.sh | 1 + .../init-hooks/35-have-network-root/bootsplash.sh | 1 + .../init-hooks/40-started-hw-config/bootsplash.sh | 1 + .../init-hooks/50-have-layered-fs/bootsplash.sh | 1 + .../init-hooks/60-have-servconfig/bootsplash.sh | 1 + .../init-hooks/70-before-plugins/bootsplash.sh | 1 + .../init-hooks/80-after-plugins/bootsplash.sh | 1 + .../init-hooks/85-have-initial-boot/bootsplash.sh | 1 + .../init-hooks/90-postinit-done/bootsplash.sh | 1 + .../bootsplash/init-hooks/95-cleanup/bootsplash.sh | 1 + .../init-hooks/99-handing-over/bootsplash.sh | 1 + .../plugins/desktop/OpenSLX/Distro/Base.pm | 432 +++++++++++ .../plugins/desktop/OpenSLX/Distro/Debian.pm | 63 ++ .../plugins/desktop/OpenSLX/Distro/Fedora.pm | 30 + .../plugins/desktop/OpenSLX/Distro/Gentoo.pm | 30 + .../plugins/desktop/OpenSLX/Distro/Scilin.pm | 132 ++++ .../plugins/desktop/OpenSLX/Distro/Suse.pm | 162 ++++ .../plugins/desktop/OpenSLX/Distro/Suse_10_2.pm | 54 ++ .../plugins/desktop/OpenSLX/Distro/Ubuntu.pm | 169 ++++ .../plugins/desktop/OpenSLX/Distro/Ubuntu_8.pm | 161 ++++ .../plugins/desktop/OpenSLX/Distro/Ubuntu_9_04.pm | 161 ++++ .../plugins/desktop/OpenSLX/OSPlugin/desktop.pm | 712 +++++++++++++++++ src/os-plugins/plugins/desktop/XX_desktop.sh | 33 + .../plugins/desktop/themes/gdm/openslx-legacy | 1 + .../themes/gdm/openslx/GdmGreeterTheme.desktop | 8 + .../plugins/desktop/themes/gdm/openslx/color.png | Bin 0 -> 177 bytes .../desktop/themes/gdm/openslx/environment.png | Bin 0 -> 4296 bytes .../themes/gdm/openslx/language-selector.png | Bin 0 -> 2253 bytes .../gdm/openslx/language-selector_inactive.png | Bin 0 -> 2198 bytes .../desktop/themes/gdm/openslx/main-runner.png | Bin 0 -> 153 bytes .../themes/gdm/openslx/openslx-logo-main.png | Bin 0 -> 82050 bytes .../desktop/themes/gdm/openslx/openslx-logo.png | Bin 0 -> 9113 bytes .../desktop/themes/gdm/openslx/sessions.png | Bin 0 -> 4245 bytes .../themes/gdm/openslx/sessions_inactive.png | Bin 0 -> 4066 bytes .../plugins/desktop/themes/gdm/openslx/system.png | Bin 0 -> 4257 bytes .../desktop/themes/gdm/openslx/system_inactive.png | Bin 0 -> 4091 bytes .../plugins/desktop/themes/gdm/openslx/theme.xml | 224 ++++++ .../themes/gdm/openslx/welcome-time-shadowed.png | Bin 0 -> 1580 bytes .../kdm/openslx-legacy/GdmGreeterTheme.desktop | 8 + .../kdm/openslx-legacy/KdmGreeterTheme.desktop | 8 + .../desktop/themes/kdm/openslx-legacy/color.png | Bin 0 -> 177 bytes .../desktop/themes/kdm/openslx-legacy/enter.png | Bin 0 -> 4260 bytes .../themes/kdm/openslx-legacy/enter_inactive.png | Bin 0 -> 4072 bytes .../themes/kdm/openslx-legacy/environment.png | Bin 0 -> 5076 bytes .../themes/kdm/openslx-legacy/main-runner.png | Bin 0 -> 143 bytes .../kdm/openslx-legacy/openslx-logo-main.png | Bin 0 -> 82050 bytes .../themes/kdm/openslx-legacy/openslx-logo.png | Bin 0 -> 9113 bytes .../desktop/themes/kdm/openslx-legacy/sessions.png | Bin 0 -> 4245 bytes .../kdm/openslx-legacy/sessions_inactive.png | Bin 0 -> 4066 bytes .../desktop/themes/kdm/openslx-legacy/system.png | Bin 0 -> 4257 bytes .../themes/kdm/openslx-legacy/system_inactive.png | Bin 0 -> 4091 bytes .../desktop/themes/kdm/openslx-legacy/theme.xml | 204 +++++ .../kdm/openslx-legacy/welcome-time-shadowed.png | Bin 0 -> 1580 bytes .../themes/kdm/openslx/KdmGreeterTheme.desktop | 8 + .../plugins/desktop/themes/kdm/openslx/color.png | Bin 0 -> 177 bytes .../plugins/desktop/themes/kdm/openslx/enter.png | Bin 0 -> 4260 bytes .../desktop/themes/kdm/openslx/enter_inactive.png | Bin 0 -> 4072 bytes .../desktop/themes/kdm/openslx/environment.png | Bin 0 -> 5076 bytes .../desktop/themes/kdm/openslx/main-runner.png | Bin 0 -> 153 bytes .../themes/kdm/openslx/openslx-logo-main.png | Bin 0 -> 82050 bytes .../desktop/themes/kdm/openslx/openslx-logo.png | Bin 0 -> 9113 bytes .../desktop/themes/kdm/openslx/sessions.png | Bin 0 -> 4245 bytes .../themes/kdm/openslx/sessions_inactive.png | Bin 0 -> 4066 bytes .../plugins/desktop/themes/kdm/openslx/system.png | Bin 0 -> 4257 bytes .../desktop/themes/kdm/openslx/system_inactive.png | Bin 0 -> 4091 bytes .../plugins/desktop/themes/kdm/openslx/theme.xml | 232 ++++++ .../themes/kdm/openslx/welcome-time-shadowed.png | Bin 0 -> 1580 bytes .../plugins/dropbear/OpenSLX/OSPlugin/dropbear.pm | 104 +++ src/os-plugins/plugins/dropbear/XX_dropbear.sh | 58 ++ .../plugins/dropbear/files/dropbearmulti | Bin 0 -> 160408 bytes .../dropbear/init-hooks/95-cleanup/dropbear.sh | 1 + .../plugins/example/OpenSLX/OSPlugin/example.pm | 154 ++++ src/os-plugins/plugins/example/XX_example.sh | 47 ++ .../plugins/infoscreen/OpenSLX/Distro/Base.pm | 60 ++ .../plugins/infoscreen/OpenSLX/Distro/Debian.pm | 32 + .../plugins/infoscreen/OpenSLX/Distro/Fedora.pm | 32 + .../plugins/infoscreen/OpenSLX/Distro/Gentoo.pm | 32 + .../plugins/infoscreen/OpenSLX/Distro/Scilin.pm | 32 + .../plugins/infoscreen/OpenSLX/Distro/Suse.pm | 32 + .../plugins/infoscreen/OpenSLX/Distro/Ubuntu.pm | 44 ++ .../infoscreen/OpenSLX/OSPlugin/infoscreen.pm | 112 +++ src/os-plugins/plugins/infoscreen/XX_infoscreen.sh | 58 ++ src/os-plugins/plugins/infoscreen/files/empty.xbm | 6 + .../plugins/infoscreen/files/infoscreenClient.tgz | Bin 0 -> 267172 bytes src/os-plugins/plugins/infoscreen/files/kiosk.dpms | 27 + .../plugins/kiosk/OpenSLX/Distro/Base.pm | 65 ++ .../plugins/kiosk/OpenSLX/Distro/Debian.pm | 32 + .../plugins/kiosk/OpenSLX/Distro/Fedora.pm | 32 + .../plugins/kiosk/OpenSLX/Distro/Gentoo.pm | 32 + .../plugins/kiosk/OpenSLX/Distro/Scilin.pm | 32 + .../plugins/kiosk/OpenSLX/Distro/Suse.pm | 32 + .../plugins/kiosk/OpenSLX/Distro/Ubuntu.pm | 47 ++ .../plugins/kiosk/OpenSLX/OSPlugin/kiosk.pm | 123 +++ src/os-plugins/plugins/kiosk/XX_kiosk.sh | 60 ++ src/os-plugins/plugins/kiosk/files/kgetty | Bin 0 -> 14524 bytes .../plugins/kiosk/files/profiles/plain/.bashrc | 1 + .../plugins/kiosk/files/profiles/plain/bashrc | 4 + .../kiosk/files/profiles/vmchooser/.bash_profile | 2 + .../plugins/kiosk/files/profiles/vmchooser/.bashrc | 1 + .../kiosk/files/profiles/vmchooser/.xinitrc | 1 + .../plugins/kiosk/files/profiles/vmchooser/bashrc | 4 + .../plugins/kiosk/files/profiles/vmchooser/xinitrc | 7 + .../plugins/openvz/OpenSLX/OSPlugin/openvz.pm | 110 +++ src/os-plugins/plugins/openvz/XX_openvz.sh | 66 ++ .../plugins/openvz/files/machine.include | 0 .../plugins/openvz/files/run-virt.include | 37 + .../init-hooks/20-nw-bridge-config/bridge.sh | 30 + .../plugins/profile/OpenSLX/Distro/Base.pm | 84 ++ .../plugins/profile/OpenSLX/Distro/Debian.pm | 32 + .../plugins/profile/OpenSLX/Distro/Fedora.pm | 32 + .../plugins/profile/OpenSLX/Distro/Gentoo.pm | 32 + .../plugins/profile/OpenSLX/Distro/Scilin.pm | 32 + .../plugins/profile/OpenSLX/Distro/Suse.pm | 68 ++ .../plugins/profile/OpenSLX/Distro/Ubuntu.pm | 66 ++ .../plugins/profile/OpenSLX/Distro/Ubuntu_10.pm | 66 ++ .../plugins/profile/OpenSLX/OSPlugin/profile.pm | 174 +++++ src/os-plugins/plugins/profile/XX_profile.sh | 31 + src/os-plugins/plugins/pvs/OpenSLX/Distro/Base.pm | 46 ++ .../plugins/pvs/OpenSLX/Distro/Debian.pm | 29 + .../plugins/pvs/OpenSLX/Distro/Fedora.pm | 28 + .../plugins/pvs/OpenSLX/Distro/Gentoo.pm | 28 + src/os-plugins/plugins/pvs/OpenSLX/Distro/Suse.pm | 28 + .../plugins/pvs/OpenSLX/Distro/Ubuntu.pm | 23 + src/os-plugins/plugins/pvs/OpenSLX/OSPlugin/pvs.pm | 127 +++ src/os-plugins/plugins/pvs/XX_pvs.sh | 46 ++ src/os-plugins/plugins/pvs/files/pvs-vncsrv | 105 +++ .../plugins/qemukvm/OpenSLX/Distro/Base.pm | 63 ++ .../plugins/qemukvm/OpenSLX/Distro/Debian.pm | 43 ++ .../plugins/qemukvm/OpenSLX/Distro/Suse.pm | 42 + .../plugins/qemukvm/OpenSLX/Distro/Ubuntu.pm | 24 + .../plugins/qemukvm/OpenSLX/OSPlugin/qemukvm.pm | 256 ++++++ src/os-plugins/plugins/qemukvm/XX_qemukvm.sh | 112 +++ src/os-plugins/plugins/qemukvm/files/ifdown | 34 + src/os-plugins/plugins/qemukvm/files/ifup | 75 ++ .../plugins/qemukvm/files/run-virt.include | 306 ++++++++ .../init-hooks/20-nw-bridge-config/bridge.sh | 30 + .../init-hooks/60-have-servconfig/vm-dhcpd.sh | 60 ++ .../plugins/syslog/OpenSLX/Distro/Base.pm | 93 +++ .../plugins/syslog/OpenSLX/Distro/Suse.pm | 41 + .../plugins/syslog/OpenSLX/OSPlugin/syslog.pm | 322 ++++++++ src/os-plugins/plugins/syslog/XX_syslog.sh | 31 + .../syslog/init-hooks/15-have-ip-config/syslog.sh | 18 + .../plugins/syslog/init-hooks/95-cleanup/syslog.sh | 12 + .../OpenSLX/OSPlugin/sysrqshutdown.pm | 101 +++ .../plugins/sysrqshutdown/XX_sysrqshutdown.sh | 38 + .../plugins/sysrqshutdown/files/shutdown | 54 ++ .../plugins/virtualbox/OpenSLX/Distro/Base.pm | 59 ++ .../plugins/virtualbox/OpenSLX/Distro/Debian.pm | 52 ++ .../plugins/virtualbox/OpenSLX/Distro/Suse.pm | 48 ++ .../plugins/virtualbox/OpenSLX/Distro/Ubuntu.pm | 54 ++ .../virtualbox/OpenSLX/OSPlugin/virtualbox.pm | 284 +++++++ src/os-plugins/plugins/virtualbox/XX_virtualbox.sh | 98 +++ .../plugins/virtualbox/files/empty-diff.vdi.gz | Bin 0 -> 282 bytes .../plugins/virtualbox/files/machine.include | 132 ++++ .../plugins/virtualbox/files/run-virt.include | 372 +++++++++ .../plugins/virtualbox/files/rwimg.vdi.gz | Bin 0 -> 268 bytes .../plugins/virtualbox/files/virtualbox.include | 47 ++ .../init-hooks/20-nw-bridge-config/bridge.sh | 30 + .../plugins/vmchooser/OpenSLX/Distro/Base.pm | 64 ++ .../plugins/vmchooser/OpenSLX/Distro/Debian.pm | 49 ++ .../plugins/vmchooser/OpenSLX/Distro/Suse.pm | 47 ++ .../plugins/vmchooser/OpenSLX/Distro/Ubuntu.pm | 50 ++ .../vmchooser/OpenSLX/OSPlugin/vmchooser.pm | 143 ++++ src/os-plugins/plugins/vmchooser/README | 21 + src/os-plugins/plugins/vmchooser/XX_vmchooser.sh | 57 ++ .../plugins/vmchooser/files/default.desktop | 10 + src/os-plugins/plugins/vmchooser/files/mesgdisp | Bin 0 -> 222820 bytes src/os-plugins/plugins/vmchooser/files/mkdosfs | 1 + src/os-plugins/plugins/vmchooser/files/printer.sh | 10 + src/os-plugins/plugins/vmchooser/files/run-virt.sh | 402 ++++++++++ src/os-plugins/plugins/vmchooser/files/scanner.sh | 4 + .../plugins/vmchooser/files/vm-template.xml | 60 ++ src/os-plugins/plugins/vmchooser/files/vmchooser | Bin 0 -> 1364048 bytes .../plugins/vmchooser/files/xmlfilter.sh | 50 ++ .../init-hooks/40-started-hw-config/run-virt.sh | 21 + .../init-hooks/80-after-plugins/virtualization.sh | 144 ++++ .../plugins/vmgrid/OpenSLX/OSPlugin/vmgrid.pm | 319 ++++++++ src/os-plugins/plugins/vmgrid/XX_vmgrid.sh | 104 +++ src/os-plugins/plugins/vmgrid/files/run-vmgrid.sh | 430 +++++++++++ src/os-plugins/plugins/vmgrid/files/vmgrid | 154 ++++ .../init-hooks/80-after-plugins/virtualization.sh | 144 ++++ .../plugins/vmware/OpenSLX/Distro/Base.pm | 47 ++ .../plugins/vmware/OpenSLX/Distro/Debian.pm | 227 ++++++ .../plugins/vmware/OpenSLX/Distro/Fedora.pm | 29 + .../plugins/vmware/OpenSLX/Distro/Gentoo.pm | 28 + .../plugins/vmware/OpenSLX/Distro/Suse.pm | 28 + .../plugins/vmware/OpenSLX/Distro/Ubuntu.pm | 23 + .../plugins/vmware/OpenSLX/OSPlugin/vmware.pm | 836 ++++++++++++++++++++ src/os-plugins/plugins/vmware/XX_vmware.sh | 201 +++++ src/os-plugins/plugins/vmware/files/README | 12 + .../plugins/vmware/files/install-vmpl.sh | 284 +++++++ src/os-plugins/plugins/vmware/files/nvram | Bin 0 -> 8664 bytes .../plugins/vmware/files/run-virt.include | 448 +++++++++++ .../init-hooks/20-nw-bridge-config/bridge.sh | 30 + .../init-hooks/60-have-servconfig/vm-dhcpd.sh | 60 ++ .../init-hooks/80-after-plugins/adapt-tmpfs.sh | 24 + .../plugins/wlanboot/OpenSLX/OSPlugin/wlanboot.pm | 154 ++++ src/os-plugins/plugins/wlanboot/XX_wlanboot.sh | 27 + src/os-plugins/plugins/wlanboot/files/bin/iwconfig | Bin 0 -> 17596 bytes src/os-plugins/plugins/wlanboot/files/bin/iwevent | Bin 0 -> 13496 bytes src/os-plugins/plugins/wlanboot/files/bin/iwgetid | Bin 0 -> 9300 bytes src/os-plugins/plugins/wlanboot/files/bin/iwlist | Bin 0 -> 25840 bytes src/os-plugins/plugins/wlanboot/files/bin/iwpriv | Bin 0 -> 9340 bytes src/os-plugins/plugins/wlanboot/files/bin/iwspy | Bin 0 -> 9328 bytes src/os-plugins/plugins/wlanboot/files/bin/iwtest | 1 + .../plugins/wlanboot/files/firmware/README | 8 + .../wlanboot/files/firmware/iwlwifi-3945-1.ucode | Bin 0 -> 149652 bytes .../wlanboot/files/firmware/iwlwifi-3945-2.ucode | Bin 0 -> 149816 bytes .../wlanboot/files/firmware/iwlwifi-4965-1.ucode | Bin 0 -> 187608 bytes .../wlanboot/files/firmware/iwlwifi-4965-2.ucode | Bin 0 -> 187764 bytes .../wlanboot/files/firmware/iwlwifi-5000-1.ucode | Bin 0 -> 345008 bytes src/os-plugins/plugins/wlanboot/files/lib/libiw.so | 1 + .../plugins/wlanboot/files/lib/libiw.so.29 | Bin 0 -> 25892 bytes .../init-hooks/10-nw-if-config/wlanboot.sh | 75 ++ .../plugins/x11vnc/OpenSLX/Distro/Base.pm | 94 +++ .../plugins/x11vnc/OpenSLX/Distro/Debian.pm | 88 +++ .../plugins/x11vnc/OpenSLX/Distro/Fedora.pm | 30 + .../plugins/x11vnc/OpenSLX/Distro/Gentoo.pm | 30 + .../plugins/x11vnc/OpenSLX/Distro/Suse.pm | 91 +++ .../plugins/x11vnc/OpenSLX/Distro/Ubuntu.pm | 23 + .../plugins/x11vnc/OpenSLX/OSPlugin/x11vnc.pm | 221 ++++++ src/os-plugins/plugins/x11vnc/XX_x11vnc.sh | 135 ++++ src/os-plugins/plugins/x11vnc/files/x11vnc-init | 83 ++ src/os-plugins/plugins/xen/OpenSLX/OSPlugin/xen.pm | 185 +++++ src/os-plugins/plugins/xen/XX_xen.sh | 73 ++ src/os-plugins/plugins/xen/files/hvm.include | 209 +++++ src/os-plugins/plugins/xen/files/machine.include | 167 ++++ src/os-plugins/plugins/xen/files/run-virt.include | 157 ++++ .../xen/init-hooks/10-nw-if-config/xennet.sh | 4 + .../xen/init-hooks/20-nw-bridge-config/bridge.sh | 30 + .../plugins/xserver/OpenSLX/Distro/Base.pm | 212 +++++ .../plugins/xserver/OpenSLX/Distro/Debian.pm | 50 ++ .../plugins/xserver/OpenSLX/Distro/Suse.pm | 89 +++ .../plugins/xserver/OpenSLX/Distro/Suse_10.pm | 63 ++ .../plugins/xserver/OpenSLX/Distro/Suse_11_0.pm | 360 +++++++++ .../plugins/xserver/OpenSLX/Distro/Suse_11_1.pm | 361 +++++++++ .../plugins/xserver/OpenSLX/Distro/Suse_11_2.pm | 53 ++ .../plugins/xserver/OpenSLX/Distro/Ubuntu.pm | 96 +++ .../plugins/xserver/OpenSLX/Distro/Ubuntu_8.pm | 73 ++ .../plugins/xserver/OpenSLX/Distro/Ubuntu_9.pm | 30 + .../plugins/xserver/OpenSLX/OSPlugin/xserver.pm | 396 ++++++++++ src/os-plugins/plugins/xserver/XX_xserver.sh | 351 +++++++++ src/os-plugins/plugins/xserver/files/README | 77 ++ .../plugins/xserver/files/ati-install.sh | 24 + .../plugins/xserver/files/nvidia-install.sh | 138 ++++ .../plugins/xserver/files/suse-gfx-install.sh | 330 ++++++++ .../plugins/xserver/files/ubuntu-gfx-install.sh | 124 +++ .../plugins/xserver/files/ubuntu-ng-gfx-install.sh | 236 ++++++ .../xserver/init-hooks/00-started/xserver.sh | 53 ++ src/os-plugins/slxos-plugin | 525 +++++++++++++ 270 files changed, 20656 insertions(+) create mode 100644 src/os-plugins/OpenSLX/OSPlugin/Base.pm create mode 100644 src/os-plugins/OpenSLX/OSPlugin/Engine.pm create mode 100644 src/os-plugins/OpenSLX/OSPlugin/Roster.pm create mode 100644 src/os-plugins/plugins/bootsplash/OpenSLX/OSPlugin/bootsplash.pm create mode 100644 src/os-plugins/plugins/bootsplash/XX_bootsplash.sh create mode 100644 src/os-plugins/plugins/bootsplash/files/lib/libglib-2.0.so.0 create mode 100644 src/os-plugins/plugins/bootsplash/files/lib/libsplashy.so.1 create mode 100644 src/os-plugins/plugins/bootsplash/files/lib/libsplashycnf.so.1 create mode 100755 src/os-plugins/plugins/bootsplash/files/sbin/splashy create mode 100755 src/os-plugins/plugins/bootsplash/files/sbin/splashy_config create mode 100755 src/os-plugins/plugins/bootsplash/files/sbin/splashy_update create mode 100644 src/os-plugins/plugins/bootsplash/files/themes/openslx/blank.ttf create mode 100644 src/os-plugins/plugins/bootsplash/files/themes/openslx/openslx.png create mode 100644 src/os-plugins/plugins/bootsplash/files/themes/openslx/theme.xml create mode 100644 src/os-plugins/plugins/bootsplash/files/usr/lib/libdirect-1.2.so.9 create mode 100644 src/os-plugins/plugins/bootsplash/files/usr/lib/libdirectfb-1.2.so.9 create mode 100644 src/os-plugins/plugins/bootsplash/files/usr/lib/libmagic.so.1 create mode 100644 src/os-plugins/plugins/bootsplash/init-hooks/05-have-kernelvars/bootsplash.sh create mode 100644 src/os-plugins/plugins/bootsplash/init-hooks/10-nw-if-config/bootsplash.sh create mode 100644 src/os-plugins/plugins/bootsplash/init-hooks/20-nw-bridge-config/bootsplash.sh create mode 100644 src/os-plugins/plugins/bootsplash/init-hooks/25-have-ip-config/bootsplash.sh create mode 100644 src/os-plugins/plugins/bootsplash/init-hooks/35-have-network-root/bootsplash.sh create mode 100644 src/os-plugins/plugins/bootsplash/init-hooks/40-started-hw-config/bootsplash.sh create mode 100644 src/os-plugins/plugins/bootsplash/init-hooks/50-have-layered-fs/bootsplash.sh create mode 100644 src/os-plugins/plugins/bootsplash/init-hooks/60-have-servconfig/bootsplash.sh create mode 100644 src/os-plugins/plugins/bootsplash/init-hooks/70-before-plugins/bootsplash.sh create mode 100644 src/os-plugins/plugins/bootsplash/init-hooks/80-after-plugins/bootsplash.sh create mode 100644 src/os-plugins/plugins/bootsplash/init-hooks/85-have-initial-boot/bootsplash.sh create mode 100644 src/os-plugins/plugins/bootsplash/init-hooks/90-postinit-done/bootsplash.sh create mode 100644 src/os-plugins/plugins/bootsplash/init-hooks/95-cleanup/bootsplash.sh create mode 100644 src/os-plugins/plugins/bootsplash/init-hooks/99-handing-over/bootsplash.sh create mode 100644 src/os-plugins/plugins/desktop/OpenSLX/Distro/Base.pm create mode 100644 src/os-plugins/plugins/desktop/OpenSLX/Distro/Debian.pm create mode 100644 src/os-plugins/plugins/desktop/OpenSLX/Distro/Fedora.pm create mode 100644 src/os-plugins/plugins/desktop/OpenSLX/Distro/Gentoo.pm create mode 100644 src/os-plugins/plugins/desktop/OpenSLX/Distro/Scilin.pm create mode 100644 src/os-plugins/plugins/desktop/OpenSLX/Distro/Suse.pm create mode 100644 src/os-plugins/plugins/desktop/OpenSLX/Distro/Suse_10_2.pm create mode 100644 src/os-plugins/plugins/desktop/OpenSLX/Distro/Ubuntu.pm create mode 100644 src/os-plugins/plugins/desktop/OpenSLX/Distro/Ubuntu_8.pm create mode 100644 src/os-plugins/plugins/desktop/OpenSLX/Distro/Ubuntu_9_04.pm create mode 100644 src/os-plugins/plugins/desktop/OpenSLX/OSPlugin/desktop.pm create mode 100644 src/os-plugins/plugins/desktop/XX_desktop.sh create mode 120000 src/os-plugins/plugins/desktop/themes/gdm/openslx-legacy create mode 100755 src/os-plugins/plugins/desktop/themes/gdm/openslx/GdmGreeterTheme.desktop create mode 100644 src/os-plugins/plugins/desktop/themes/gdm/openslx/color.png create mode 100644 src/os-plugins/plugins/desktop/themes/gdm/openslx/environment.png create mode 100644 src/os-plugins/plugins/desktop/themes/gdm/openslx/language-selector.png create mode 100644 src/os-plugins/plugins/desktop/themes/gdm/openslx/language-selector_inactive.png create mode 100644 src/os-plugins/plugins/desktop/themes/gdm/openslx/main-runner.png create mode 100644 src/os-plugins/plugins/desktop/themes/gdm/openslx/openslx-logo-main.png create mode 100644 src/os-plugins/plugins/desktop/themes/gdm/openslx/openslx-logo.png create mode 100644 src/os-plugins/plugins/desktop/themes/gdm/openslx/sessions.png create mode 100644 src/os-plugins/plugins/desktop/themes/gdm/openslx/sessions_inactive.png create mode 100644 src/os-plugins/plugins/desktop/themes/gdm/openslx/system.png create mode 100644 src/os-plugins/plugins/desktop/themes/gdm/openslx/system_inactive.png create mode 100644 src/os-plugins/plugins/desktop/themes/gdm/openslx/theme.xml create mode 100644 src/os-plugins/plugins/desktop/themes/gdm/openslx/welcome-time-shadowed.png create mode 100755 src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/GdmGreeterTheme.desktop create mode 100755 src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/KdmGreeterTheme.desktop create mode 100644 src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/color.png create mode 100644 src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/enter.png create mode 100644 src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/enter_inactive.png create mode 100644 src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/environment.png create mode 100644 src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/main-runner.png create mode 100644 src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/openslx-logo-main.png create mode 100644 src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/openslx-logo.png create mode 100644 src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/sessions.png create mode 100644 src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/sessions_inactive.png create mode 100644 src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/system.png create mode 100644 src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/system_inactive.png create mode 100644 src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/theme.xml create mode 100644 src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/welcome-time-shadowed.png create mode 100755 src/os-plugins/plugins/desktop/themes/kdm/openslx/KdmGreeterTheme.desktop create mode 100644 src/os-plugins/plugins/desktop/themes/kdm/openslx/color.png create mode 100644 src/os-plugins/plugins/desktop/themes/kdm/openslx/enter.png create mode 100644 src/os-plugins/plugins/desktop/themes/kdm/openslx/enter_inactive.png create mode 100644 src/os-plugins/plugins/desktop/themes/kdm/openslx/environment.png create mode 100644 src/os-plugins/plugins/desktop/themes/kdm/openslx/main-runner.png create mode 100644 src/os-plugins/plugins/desktop/themes/kdm/openslx/openslx-logo-main.png create mode 100644 src/os-plugins/plugins/desktop/themes/kdm/openslx/openslx-logo.png create mode 100644 src/os-plugins/plugins/desktop/themes/kdm/openslx/sessions.png create mode 100644 src/os-plugins/plugins/desktop/themes/kdm/openslx/sessions_inactive.png create mode 100644 src/os-plugins/plugins/desktop/themes/kdm/openslx/system.png create mode 100644 src/os-plugins/plugins/desktop/themes/kdm/openslx/system_inactive.png create mode 100644 src/os-plugins/plugins/desktop/themes/kdm/openslx/theme.xml create mode 100644 src/os-plugins/plugins/desktop/themes/kdm/openslx/welcome-time-shadowed.png create mode 100644 src/os-plugins/plugins/dropbear/OpenSLX/OSPlugin/dropbear.pm create mode 100644 src/os-plugins/plugins/dropbear/XX_dropbear.sh create mode 100755 src/os-plugins/plugins/dropbear/files/dropbearmulti create mode 100755 src/os-plugins/plugins/dropbear/init-hooks/95-cleanup/dropbear.sh create mode 100644 src/os-plugins/plugins/example/OpenSLX/OSPlugin/example.pm create mode 100644 src/os-plugins/plugins/example/XX_example.sh create mode 100644 src/os-plugins/plugins/infoscreen/OpenSLX/Distro/Base.pm create mode 100644 src/os-plugins/plugins/infoscreen/OpenSLX/Distro/Debian.pm create mode 100644 src/os-plugins/plugins/infoscreen/OpenSLX/Distro/Fedora.pm create mode 100644 src/os-plugins/plugins/infoscreen/OpenSLX/Distro/Gentoo.pm create mode 100644 src/os-plugins/plugins/infoscreen/OpenSLX/Distro/Scilin.pm create mode 100644 src/os-plugins/plugins/infoscreen/OpenSLX/Distro/Suse.pm create mode 100644 src/os-plugins/plugins/infoscreen/OpenSLX/Distro/Ubuntu.pm create mode 100644 src/os-plugins/plugins/infoscreen/OpenSLX/OSPlugin/infoscreen.pm create mode 100644 src/os-plugins/plugins/infoscreen/XX_infoscreen.sh create mode 100644 src/os-plugins/plugins/infoscreen/files/empty.xbm create mode 100644 src/os-plugins/plugins/infoscreen/files/infoscreenClient.tgz create mode 100755 src/os-plugins/plugins/infoscreen/files/kiosk.dpms create mode 100644 src/os-plugins/plugins/kiosk/OpenSLX/Distro/Base.pm create mode 100644 src/os-plugins/plugins/kiosk/OpenSLX/Distro/Debian.pm create mode 100644 src/os-plugins/plugins/kiosk/OpenSLX/Distro/Fedora.pm create mode 100644 src/os-plugins/plugins/kiosk/OpenSLX/Distro/Gentoo.pm create mode 100644 src/os-plugins/plugins/kiosk/OpenSLX/Distro/Scilin.pm create mode 100644 src/os-plugins/plugins/kiosk/OpenSLX/Distro/Suse.pm create mode 100644 src/os-plugins/plugins/kiosk/OpenSLX/Distro/Ubuntu.pm create mode 100644 src/os-plugins/plugins/kiosk/OpenSLX/OSPlugin/kiosk.pm create mode 100644 src/os-plugins/plugins/kiosk/XX_kiosk.sh create mode 100755 src/os-plugins/plugins/kiosk/files/kgetty create mode 120000 src/os-plugins/plugins/kiosk/files/profiles/plain/.bashrc create mode 100644 src/os-plugins/plugins/kiosk/files/profiles/plain/bashrc create mode 100644 src/os-plugins/plugins/kiosk/files/profiles/vmchooser/.bash_profile create mode 120000 src/os-plugins/plugins/kiosk/files/profiles/vmchooser/.bashrc create mode 120000 src/os-plugins/plugins/kiosk/files/profiles/vmchooser/.xinitrc create mode 100644 src/os-plugins/plugins/kiosk/files/profiles/vmchooser/bashrc create mode 100644 src/os-plugins/plugins/kiosk/files/profiles/vmchooser/xinitrc create mode 100644 src/os-plugins/plugins/openvz/OpenSLX/OSPlugin/openvz.pm create mode 100644 src/os-plugins/plugins/openvz/XX_openvz.sh create mode 100644 src/os-plugins/plugins/openvz/files/machine.include create mode 100644 src/os-plugins/plugins/openvz/files/run-virt.include create mode 100755 src/os-plugins/plugins/openvz/init-hooks/20-nw-bridge-config/bridge.sh create mode 100644 src/os-plugins/plugins/profile/OpenSLX/Distro/Base.pm create mode 100644 src/os-plugins/plugins/profile/OpenSLX/Distro/Debian.pm create mode 100644 src/os-plugins/plugins/profile/OpenSLX/Distro/Fedora.pm create mode 100644 src/os-plugins/plugins/profile/OpenSLX/Distro/Gentoo.pm create mode 100644 src/os-plugins/plugins/profile/OpenSLX/Distro/Scilin.pm create mode 100644 src/os-plugins/plugins/profile/OpenSLX/Distro/Suse.pm create mode 100644 src/os-plugins/plugins/profile/OpenSLX/Distro/Ubuntu.pm create mode 100644 src/os-plugins/plugins/profile/OpenSLX/Distro/Ubuntu_10.pm create mode 100644 src/os-plugins/plugins/profile/OpenSLX/OSPlugin/profile.pm create mode 100644 src/os-plugins/plugins/profile/XX_profile.sh create mode 100644 src/os-plugins/plugins/pvs/OpenSLX/Distro/Base.pm create mode 100644 src/os-plugins/plugins/pvs/OpenSLX/Distro/Debian.pm create mode 100644 src/os-plugins/plugins/pvs/OpenSLX/Distro/Fedora.pm create mode 100644 src/os-plugins/plugins/pvs/OpenSLX/Distro/Gentoo.pm create mode 100644 src/os-plugins/plugins/pvs/OpenSLX/Distro/Suse.pm create mode 100644 src/os-plugins/plugins/pvs/OpenSLX/Distro/Ubuntu.pm create mode 100644 src/os-plugins/plugins/pvs/OpenSLX/OSPlugin/pvs.pm create mode 100644 src/os-plugins/plugins/pvs/XX_pvs.sh create mode 100755 src/os-plugins/plugins/pvs/files/pvs-vncsrv create mode 100644 src/os-plugins/plugins/qemukvm/OpenSLX/Distro/Base.pm create mode 100644 src/os-plugins/plugins/qemukvm/OpenSLX/Distro/Debian.pm create mode 100644 src/os-plugins/plugins/qemukvm/OpenSLX/Distro/Suse.pm create mode 100644 src/os-plugins/plugins/qemukvm/OpenSLX/Distro/Ubuntu.pm create mode 100644 src/os-plugins/plugins/qemukvm/OpenSLX/OSPlugin/qemukvm.pm create mode 100644 src/os-plugins/plugins/qemukvm/XX_qemukvm.sh create mode 100644 src/os-plugins/plugins/qemukvm/files/ifdown create mode 100644 src/os-plugins/plugins/qemukvm/files/ifup create mode 100644 src/os-plugins/plugins/qemukvm/files/run-virt.include create mode 100644 src/os-plugins/plugins/qemukvm/init-hooks/20-nw-bridge-config/bridge.sh create mode 100755 src/os-plugins/plugins/qemukvm/init-hooks/60-have-servconfig/vm-dhcpd.sh create mode 100644 src/os-plugins/plugins/syslog/OpenSLX/Distro/Base.pm create mode 100644 src/os-plugins/plugins/syslog/OpenSLX/Distro/Suse.pm create mode 100644 src/os-plugins/plugins/syslog/OpenSLX/OSPlugin/syslog.pm create mode 100644 src/os-plugins/plugins/syslog/XX_syslog.sh create mode 100644 src/os-plugins/plugins/syslog/init-hooks/15-have-ip-config/syslog.sh create mode 100644 src/os-plugins/plugins/syslog/init-hooks/95-cleanup/syslog.sh create mode 100644 src/os-plugins/plugins/sysrqshutdown/OpenSLX/OSPlugin/sysrqshutdown.pm create mode 100644 src/os-plugins/plugins/sysrqshutdown/XX_sysrqshutdown.sh create mode 100644 src/os-plugins/plugins/sysrqshutdown/files/shutdown create mode 100644 src/os-plugins/plugins/virtualbox/OpenSLX/Distro/Base.pm create mode 100644 src/os-plugins/plugins/virtualbox/OpenSLX/Distro/Debian.pm create mode 100644 src/os-plugins/plugins/virtualbox/OpenSLX/Distro/Suse.pm create mode 100644 src/os-plugins/plugins/virtualbox/OpenSLX/Distro/Ubuntu.pm create mode 100644 src/os-plugins/plugins/virtualbox/OpenSLX/OSPlugin/virtualbox.pm create mode 100644 src/os-plugins/plugins/virtualbox/XX_virtualbox.sh create mode 100644 src/os-plugins/plugins/virtualbox/files/empty-diff.vdi.gz create mode 100644 src/os-plugins/plugins/virtualbox/files/machine.include create mode 100644 src/os-plugins/plugins/virtualbox/files/run-virt.include create mode 100644 src/os-plugins/plugins/virtualbox/files/rwimg.vdi.gz create mode 100644 src/os-plugins/plugins/virtualbox/files/virtualbox.include create mode 100644 src/os-plugins/plugins/virtualbox/init-hooks/20-nw-bridge-config/bridge.sh create mode 100644 src/os-plugins/plugins/vmchooser/OpenSLX/Distro/Base.pm create mode 100644 src/os-plugins/plugins/vmchooser/OpenSLX/Distro/Debian.pm create mode 100644 src/os-plugins/plugins/vmchooser/OpenSLX/Distro/Suse.pm create mode 100644 src/os-plugins/plugins/vmchooser/OpenSLX/Distro/Ubuntu.pm create mode 100644 src/os-plugins/plugins/vmchooser/OpenSLX/OSPlugin/vmchooser.pm create mode 100644 src/os-plugins/plugins/vmchooser/README create mode 100644 src/os-plugins/plugins/vmchooser/XX_vmchooser.sh create mode 100644 src/os-plugins/plugins/vmchooser/files/default.desktop create mode 100755 src/os-plugins/plugins/vmchooser/files/mesgdisp create mode 120000 src/os-plugins/plugins/vmchooser/files/mkdosfs create mode 100755 src/os-plugins/plugins/vmchooser/files/printer.sh create mode 100644 src/os-plugins/plugins/vmchooser/files/run-virt.sh create mode 100755 src/os-plugins/plugins/vmchooser/files/scanner.sh create mode 100755 src/os-plugins/plugins/vmchooser/files/vm-template.xml create mode 100644 src/os-plugins/plugins/vmchooser/files/vmchooser create mode 100755 src/os-plugins/plugins/vmchooser/files/xmlfilter.sh create mode 100644 src/os-plugins/plugins/vmchooser/init-hooks/40-started-hw-config/run-virt.sh create mode 100644 src/os-plugins/plugins/vmchooser/init-hooks/80-after-plugins/virtualization.sh create mode 100644 src/os-plugins/plugins/vmgrid/OpenSLX/OSPlugin/vmgrid.pm create mode 100644 src/os-plugins/plugins/vmgrid/XX_vmgrid.sh create mode 100644 src/os-plugins/plugins/vmgrid/files/run-vmgrid.sh create mode 100644 src/os-plugins/plugins/vmgrid/files/vmgrid create mode 100644 src/os-plugins/plugins/vmgrid/init-hooks/80-after-plugins/virtualization.sh create mode 100644 src/os-plugins/plugins/vmware/OpenSLX/Distro/Base.pm create mode 100644 src/os-plugins/plugins/vmware/OpenSLX/Distro/Debian.pm create mode 100644 src/os-plugins/plugins/vmware/OpenSLX/Distro/Fedora.pm create mode 100644 src/os-plugins/plugins/vmware/OpenSLX/Distro/Gentoo.pm create mode 100644 src/os-plugins/plugins/vmware/OpenSLX/Distro/Suse.pm create mode 100644 src/os-plugins/plugins/vmware/OpenSLX/Distro/Ubuntu.pm create mode 100644 src/os-plugins/plugins/vmware/OpenSLX/OSPlugin/vmware.pm create mode 100644 src/os-plugins/plugins/vmware/XX_vmware.sh create mode 100644 src/os-plugins/plugins/vmware/files/README create mode 100644 src/os-plugins/plugins/vmware/files/install-vmpl.sh create mode 100644 src/os-plugins/plugins/vmware/files/nvram create mode 100644 src/os-plugins/plugins/vmware/files/run-virt.include create mode 100755 src/os-plugins/plugins/vmware/init-hooks/20-nw-bridge-config/bridge.sh create mode 100755 src/os-plugins/plugins/vmware/init-hooks/60-have-servconfig/vm-dhcpd.sh create mode 100644 src/os-plugins/plugins/vmware/init-hooks/80-after-plugins/adapt-tmpfs.sh create mode 100644 src/os-plugins/plugins/wlanboot/OpenSLX/OSPlugin/wlanboot.pm create mode 100644 src/os-plugins/plugins/wlanboot/XX_wlanboot.sh create mode 100755 src/os-plugins/plugins/wlanboot/files/bin/iwconfig create mode 100755 src/os-plugins/plugins/wlanboot/files/bin/iwevent create mode 100755 src/os-plugins/plugins/wlanboot/files/bin/iwgetid create mode 100755 src/os-plugins/plugins/wlanboot/files/bin/iwlist create mode 100755 src/os-plugins/plugins/wlanboot/files/bin/iwpriv create mode 100755 src/os-plugins/plugins/wlanboot/files/bin/iwspy create mode 100644 src/os-plugins/plugins/wlanboot/files/bin/iwtest create mode 100644 src/os-plugins/plugins/wlanboot/files/firmware/README create mode 100644 src/os-plugins/plugins/wlanboot/files/firmware/iwlwifi-3945-1.ucode create mode 100644 src/os-plugins/plugins/wlanboot/files/firmware/iwlwifi-3945-2.ucode create mode 100644 src/os-plugins/plugins/wlanboot/files/firmware/iwlwifi-4965-1.ucode create mode 100644 src/os-plugins/plugins/wlanboot/files/firmware/iwlwifi-4965-2.ucode create mode 100644 src/os-plugins/plugins/wlanboot/files/firmware/iwlwifi-5000-1.ucode create mode 120000 src/os-plugins/plugins/wlanboot/files/lib/libiw.so create mode 100755 src/os-plugins/plugins/wlanboot/files/lib/libiw.so.29 create mode 100755 src/os-plugins/plugins/wlanboot/init-hooks/10-nw-if-config/wlanboot.sh create mode 100644 src/os-plugins/plugins/x11vnc/OpenSLX/Distro/Base.pm create mode 100644 src/os-plugins/plugins/x11vnc/OpenSLX/Distro/Debian.pm create mode 100644 src/os-plugins/plugins/x11vnc/OpenSLX/Distro/Fedora.pm create mode 100644 src/os-plugins/plugins/x11vnc/OpenSLX/Distro/Gentoo.pm create mode 100644 src/os-plugins/plugins/x11vnc/OpenSLX/Distro/Suse.pm create mode 100644 src/os-plugins/plugins/x11vnc/OpenSLX/Distro/Ubuntu.pm create mode 100644 src/os-plugins/plugins/x11vnc/OpenSLX/OSPlugin/x11vnc.pm create mode 100644 src/os-plugins/plugins/x11vnc/XX_x11vnc.sh create mode 100755 src/os-plugins/plugins/x11vnc/files/x11vnc-init create mode 100644 src/os-plugins/plugins/xen/OpenSLX/OSPlugin/xen.pm create mode 100644 src/os-plugins/plugins/xen/XX_xen.sh create mode 100644 src/os-plugins/plugins/xen/files/hvm.include create mode 100644 src/os-plugins/plugins/xen/files/machine.include create mode 100644 src/os-plugins/plugins/xen/files/run-virt.include create mode 100644 src/os-plugins/plugins/xen/init-hooks/10-nw-if-config/xennet.sh create mode 100755 src/os-plugins/plugins/xen/init-hooks/20-nw-bridge-config/bridge.sh create mode 100644 src/os-plugins/plugins/xserver/OpenSLX/Distro/Base.pm create mode 100644 src/os-plugins/plugins/xserver/OpenSLX/Distro/Debian.pm create mode 100644 src/os-plugins/plugins/xserver/OpenSLX/Distro/Suse.pm create mode 100644 src/os-plugins/plugins/xserver/OpenSLX/Distro/Suse_10.pm create mode 100644 src/os-plugins/plugins/xserver/OpenSLX/Distro/Suse_11_0.pm create mode 100644 src/os-plugins/plugins/xserver/OpenSLX/Distro/Suse_11_1.pm create mode 100644 src/os-plugins/plugins/xserver/OpenSLX/Distro/Suse_11_2.pm create mode 100644 src/os-plugins/plugins/xserver/OpenSLX/Distro/Ubuntu.pm create mode 100644 src/os-plugins/plugins/xserver/OpenSLX/Distro/Ubuntu_8.pm create mode 100644 src/os-plugins/plugins/xserver/OpenSLX/Distro/Ubuntu_9.pm create mode 100644 src/os-plugins/plugins/xserver/OpenSLX/OSPlugin/xserver.pm create mode 100644 src/os-plugins/plugins/xserver/XX_xserver.sh create mode 100644 src/os-plugins/plugins/xserver/files/README create mode 100755 src/os-plugins/plugins/xserver/files/ati-install.sh create mode 100755 src/os-plugins/plugins/xserver/files/nvidia-install.sh create mode 100755 src/os-plugins/plugins/xserver/files/suse-gfx-install.sh create mode 100755 src/os-plugins/plugins/xserver/files/ubuntu-gfx-install.sh create mode 100755 src/os-plugins/plugins/xserver/files/ubuntu-ng-gfx-install.sh create mode 100644 src/os-plugins/plugins/xserver/init-hooks/00-started/xserver.sh create mode 100755 src/os-plugins/slxos-plugin (limited to 'src/os-plugins') diff --git a/src/os-plugins/OpenSLX/OSPlugin/Base.pm b/src/os-plugins/OpenSLX/OSPlugin/Base.pm new file mode 100644 index 00000000..2af0f04c --- /dev/null +++ b/src/os-plugins/OpenSLX/OSPlugin/Base.pm @@ -0,0 +1,631 @@ +# Copyright (c) 2006, 2007 - 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/ +# ----------------------------------------------------------------------------- +# Base.pm +# - provides empty base of the OpenSLX OSPlugin API. +# ----------------------------------------------------------------------------- +package OpenSLX::OSPlugin::Base; + +use strict; +use warnings; + +our $VERSION = 1.01; # API-version . implementation-version + +=head1 NAME + +OpenSLX::OSPlugin::Base - the base class for all OpenSLX OS-plugins. + +=head1 DESCRIPTION + +This class defines the OpenSLX API for OS-plugins. + +The general idea behind OS-plugins is to extend any installed vendor-OS with +a specific features. Each feature is implemented as a separate, small software +component in order to make them easy to understand and maintain. + +Since all of these software components are plugged into the OpenSLX system by +means of a common API, we call them Bs. + +This API can be separated into different parts: + +=over + +=item - L (provide info about a plugin) + +=item - L (installing or removing a plugin into/from a +vendor-OS) + +=item - L (integrating a plugin into an initramfs) + +=back + +=head1 MORE INFO + +Please read the user-level introduction on plugins in the OpenSLX-wiki: +L (in German). + +If you'd like to know how a plugin is implemented, please have a look at the +'example' plugin, which contains some explainations and useful hints. + +If you have any questions regarding the concept of OS-plugins and their +implementation, please drop a mail to: ot@openslx.com, or join the IRC-channel +'#openslx' (on freenode). + +=cut + +use Scalar::Util qw( weaken ); + +use OpenSLX::Basics; +use OpenSLX::OSPlugin::Roster; + +=head1 PLUGIN API + +=head2 Declarative Interface + +=over + +=item new() + +Every plugin should provide a new-method and provide it's own name in the +'name' entry of $self. + +Please note that by convention, plugin names are all lowercase! + +=cut + +sub new +{ + confess "Creating OpenSLX::OSPlugin::Base-objects directly makes no sense!"; +} + +=item initialize() + +Initializes basic context for this plugin (esp. a reference to the OSPlugin +engine that drives this plugin. + +=cut + +sub initialize +{ + my $self = shift; + + $self->{'os-plugin-engine'} = shift; + $self->{'distro'} = shift; + + weaken($self->{'os-plugin-engine'}); + # avoid circular reference between plugin and its engine + + return; +} + +=item getInfo() + +Returns a hash-ref with administrative information about this plugin (what does +it do and how does it relate to other plugins). Every plugin needs to provide +this method and return the information about itself. + +The returned hash-ref must include at least the following entries: + +=over + +=item B + +Explains the purpose of this plugins. + +=item B + +Specifies the execution precedence of this plugin with respect to all other +plugins (plugins with lower precedences will be started before the ones with +a higher precedence). + +Valid values range from 0-99. If your plugin does not have any requirements +in this context, just specify the default value '50'. + +=item B + +Specifies the list of plugins that are required by this plugin. + +Before any plugin can be installed, all other plugins that are required by it +must have been installed. + +=back + +=cut + +sub getInfo +{ + my $self = shift; + + return { + # a short (one-liner) description of this plugin + description => '', + }; +} + +=item getAttrInfo() + +Returns a hash-ref with information about all attributes supported by this +specific plugin. + +This default configuration will be added as attributes to the default system, +such that it can be overruled for any specific system by means of B. + +The returned hash-ref must include at least the following entries: + +=over + +=item B::active> + +Indicates whether or not this plugin is active (1 for active, 0 for inactive). + +=back + +=cut + +sub getAttrInfo +{ + my $self = shift; + + # This default configuration will be added as attributes to the default + # system, such that it can be overruled for any specific system by means + # of slxconfig. + return { + # attribute 'active' is mandatory for all plugins + }; +} + +=item getDefaultAttrsForVendorOS() + +Returns a hash-ref with the default attribute values for the given vendor-OS. + +=cut + +sub getDefaultAttrsForVendorOS +{ + my $self = shift; + + # the default implementation does not change the default values at all: + return $self->getAttrInfo(); +} + +=item checkStage3AttrValues() + +Checks if the stage3 values given in B<$stage3Attrs> are allowed and make sense. + +This method returns an array-ref of problems found. If there were no problems, +this methods returns undef. + +Plugins may override this implementation to do checks that for instance look +at the stage1 vendor-OS-attributes given in B<$vendorOSAttrs>. + +N.B.: this method is called while being chrooted into the vendor-OS, so it + may invoke all distro methods that expect to be run in this environment, + too + +=cut + +sub checkStage3AttrValues +{ + my $self = shift; + my $stage3Attrs = shift; + my $vendorOSAttrs = shift; + + # this default implementation does no further checks (thus relying on the + # attributte regex check that is done in the AttributeRoster) + return; +} + +=item dependsOnPlugin() + +=cut + +sub dependsOnPlugin +{ + my $self = shift; + my $otherName = shift; + + if (!defined $self->{dependsOn}) { + my @dependsOn = $self->_determineAllPluginsWeDependOn(); + $self->{dependsOn} = \@dependsOn; + } + + return grep { $_ eq $otherName } @{$self->{dependsOn}}; +} + +=back + +=head2 Vendor-OS Interface + +=over + +=item installationPhase() + +In this method, the plugin should install itself into the given vendor-OS. + +What "installation" means is up to the plugin. Some plugins may just copy +a file from the OpenSLX host installation into the vendor-OS, while others may +need to download files from the internet and/or install packages through the +vendor-OS' meta packager. + +N.B.: This method is invoked while chrooted into the vendor-OS root. + +The hash-ref given in B<$info> contains vital information for the installation +process: + +=over + +=item C + +The folder where the stage1-plugin should store all files required by the +corresponding stage3 runlevel script. + +=item C + +A temporary playground that will be cleaned up automatically. + +=item C + +In order to make the OpenSLX files from the host available, the OpenSLX base +folder (normally /opt/openslx) will be mounted into the chroot. +So if you have to copy any files from the host, fetch them from this path. + +=item C + +In order to make the OpenSLX config files from the host available, the OpenSLX +config folder (normally /etc/opt/openslx) will be mounted into the chroot. +So if you have to copy any config files from the host, fetch them from this +path. + +=item C + +Contains the attributes in effect for the installation of this plugin. + +=back + +=cut + +sub installationPhase +{ + my $self = shift; + my $info = shift; + + return; +} + +=item removalPhase() + +In this method, the plugin should remove itself from the given vendor-OS. + +What "removal" means is up to the plugin. Some plugins may just delete +a file from the vendor-OS, while others may need to uninstall packages through +the vendor-OS' meta packager. + +N.B.: This method is invoked while chrooted into the vendor-OS root. + +The hash-ref given in B<$info> contains vital information for the installation +process: + +=over + +=item C + +The folder where the stage1-plugin should store all files required by the +corresponding stage3 runlevel script. + +=item C + +A temporary playground that will be cleaned up automatically. + +=item C + +In order to make the OpenSLX files from the host available, the OpenSLX base +folder (normally /opt/openslx) will be mounted into the chroot. +So if you have to copy any files from the host, fetch them from this path. + +=item C + +In order to make the OpenSLX config files from the host available, the OpenSLX +config folder (normally /etc/opt/openslx) will be mounted into the chroot. +So if you have to copy any config files from the host, fetch them from this +path. + +=item C + +Contains the attributes in effect for the installation of this plugin. + +=back + +=cut + +sub removalPhase +{ + my $self = shift; + my $info = shift; + + return; +} + +=item preInstallationPhase() + +In this method, any preparations for installation of the plugin into a vendor-OS +should be executed. As this method is being called immediately before the chroot +is entered, this is the last/only chance to copy any files into the chroot that +are required from within (in installationPhase()). + +The given parameters are similar to the ones for installationPhase(), except +that all paths are now relative to the root-fs instead of being relative to the +chroot (i.e. the paths are ready to be used from outside the chroot): + +A "exit 1;" will result in a not installed plugin. + +=over + +=item C + +The folder where the stage1-plugin should store all files required by the +corresponding stage3 runlevel script. + +=item C + +A temporary playground that will be cleaned up automatically. + +If a plugin needs to unpack any archives, these archives should be copied to +this folder (as it will be cleaned automatically). + +=item C + +In order to make the OpenSLX files from the host available, the OpenSLX base +folder (normally /opt/openslx) will be mounted into the chroot. +So if you have to copy any files from the host, fetch them from this path. + +=item C + +In order to make the OpenSLX config files from the host available, the OpenSLX +config folder (normally /etc/opt/openslx) will be mounted into the chroot. +So if you have to copy any config files from the host, fetch them from this +path. + +=item C + +Contains the attributes in effect for the installation of this plugin. + +=item C + +Contains the path to the vendor-OS into which the plugin will be installed. + +=back + +=cut + +sub preInstallationPhase +{ + my $self = shift; + my $info = shift; + + return; +} + +=item postRemovalPhase() + +In this method, any plugin has the chance to do any necessary cleanup that +must be executed outside of the chroot. + +This method is invoked immediately after leaving the chroot into the vendor-OS +root, but before the plugin-temp-path has been cleaned up. So if required, any +files could be copied out of the temp-path somewhere into the root-fs. + +The given parameters are similar to the ones for removalPhase(), except that all +paths are now relative to the root-fs instead of being relative to the chroot +(i.e. the paths are ready to be used from outside the chroot): + +=over + +=item C + +The folder where the stage1-plugin should store all files required by the +corresponding stage3 runlevel script. + +=item C + +A temporary playground that will be cleaned up automatically. + +=item C + +In order to make the OpenSLX files from the host available, the OpenSLX base +folder (normally /opt/openslx) will be mounted into the chroot. +So if you have to copy any files from the host, fetch them from this path. + +=item C + +In order to make the OpenSLX config files from the host available, the OpenSLX +config folder (normally /etc/opt/openslx) will be mounted into the chroot. +So if you have to copy any config files from the host, fetch them from this +path. + +=item C + +Contains the attributes in effect for the installation of this plugin. + +=item C + +Contains the path to the vendor-OS from which the plugin has been removed. + +=back + +=cut + +sub postRemovalPhase +{ + my $self = shift; + my $info = shift; + + return; +} + +=back + +=head2 Initramfs Interface + +All of the following methods are invoked by the config demuxer when it makes an +initramfs for a system that has this plugin activated. Through these methods, +each plugin can integrate itself into that initramfs. + +=over + +=item suggestAdditionalKernelParams() + +Called in order to give the plugin a chance to add any kernel params it +requires. + +In order to do so, the plugin should return a list of additional kernel params +that it would like to see added. + +=cut + +sub suggestAdditionalKernelParams +{ + my $self = shift; + my $makeInitRamFSEngine = shift; + + return; +} + +=item suggestAdditionalKernelModules() + +Called in order to give the plugin a chance to add any kernel modules it +requires. + +In order to do so, the plugin should return the names of additional kernel +modules that it would like to see added. + +=cut + +sub suggestAdditionalKernelModules +{ + my $self = shift; + my $makeInitRamFSEngine = shift; + my $attrs = shift; + + return; +} + +=item copyRequiredFilesIntoInitramfs() + +Called in order to give the plugin a chance to copy all required files from the +vendor-OS into the initramfs. + +N.B.: Only files that are indeed required by the initramfs should be copied +here, i.e. files that are needed *before* the root-fs has been mounted. +All other files should be taken from the root-fs instead! + +=cut + +sub copyRequiredFilesIntoInitramfs +{ + my $self = shift; + my $targetPath = shift; + my $attrs = shift; + my $makeInitRamFSEngine = shift; + + return; +} + +=item setupPluginInInitramfs() + +Called in order to let the plugin setup all the files it requires in the +initramfs. + +Normally, you don't need to override this method in your own plugin, +as it is usually enough to override suggestAdditionalKernelParams(), +suggestAdditionalKernelModules() and maybe copyRequiredFilesIntoInitramfs(). + +=cut + +sub setupPluginInInitramfs +{ + my $self = shift; + my $attrs = shift; + my $makeInitRamFSEngine = shift; + + my $pluginName = $self->{name}; + my $pluginSrcPath = "$openslxConfig{'base-path'}/lib/plugins"; + my $buildPath = $makeInitRamFSEngine->{'build-path'}; + my $pluginInitdPath = "$buildPath/etc/plugin-init.d"; + my $initHooksPath = "$buildPath/etc/init-hooks"; + + # copy runlevel script + my $precedence = sprintf('%02d', $self->getInfo()->{precedence}); + my $scriptName = "$pluginSrcPath/$pluginName/XX_${pluginName}.sh"; + my $targetName = "$pluginInitdPath/${precedence}_${pluginName}.sh"; + if (-e $scriptName) { + $makeInitRamFSEngine->addCMD("cp $scriptName $targetName"); + $makeInitRamFSEngine->addCMD("chmod a+x $targetName"); + } + + # copy init hook scripts, if any + if (-d "$pluginSrcPath/$pluginName/init-hooks") { + my $hookSrcPath = "$pluginSrcPath/$pluginName/init-hooks"; + $makeInitRamFSEngine->addCMD( + "cp -r $hookSrcPath/* $buildPath/etc/init-hooks/" + ); + } + + # invoke hook methods to suggest additional kernel params ... + my @suggestedParams + = $self->suggestAdditionalKernelParams($makeInitRamFSEngine); + if (@suggestedParams) { + my $params = join ' ', @suggestedParams; + vlog(1, "plugin $pluginName suggests these kernel params: $params"); + $makeInitRamFSEngine->addKernelParams(@suggestedParams); + } + + # ... and kernel modules + my @suggestedModules + = $self->suggestAdditionalKernelModules($makeInitRamFSEngine, $attrs); + if (@suggestedModules) { + my $modules = join(',', @suggestedModules); + vlog(1, "plugin $pluginName suggests these kernel modules: $modules"); + $makeInitRamFSEngine->addKernelModules(@suggestedModules); + } + + # invoke hook method to copy any further files that are required in stage3 + # before the root-fs has been mounted + $self->copyRequiredFilesIntoInitramfs( + $buildPath, $attrs, $makeInitRamFSEngine + ); + + return 1; +} + +sub _determineAllPluginsWeDependOn +{ + my $self = shift; + my $seen = shift || {}; + + return if $seen->{$self->{name}}; + $seen->{$self->{name}} = 1; + + my %dependsOn; + if ($self->getInfo()->{required}) { + @dependsOn{@{$self->getInfo()->{required}}} = (); + } + + foreach my $depName (keys %dependsOn) { + my $depPlugin = OpenSLX::OSPlugin::Roster->getPlugin($depName); + my @subDeps = $depPlugin->_determineAllPluginsWeDependOn($seen); + @dependsOn{@subDeps} = (); + } + + return keys %dependsOn; +} + +=back + +1; diff --git a/src/os-plugins/OpenSLX/OSPlugin/Engine.pm b/src/os-plugins/OpenSLX/OSPlugin/Engine.pm new file mode 100644 index 00000000..25827205 --- /dev/null +++ b/src/os-plugins/OpenSLX/OSPlugin/Engine.pm @@ -0,0 +1,857 @@ +# Copyright (c) 2007, 2008 - 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/ +# ----------------------------------------------------------------------------- +# Engine.pm +# - provides driver engine for the OSPlugin API. +# ----------------------------------------------------------------------------- +package OpenSLX::OSPlugin::Engine; + +use strict; +use warnings; + +our $VERSION = 1.01; # API-version . implementation-version + +use Config; +use File::Basename; +use File::Path; +use Storable; + +use OpenSLX::Basics; +use OpenSLX::OSPlugin::Roster; +use OpenSLX::OSSetup::Engine; +use OpenSLX::ScopedResource; +use OpenSLX::Utils; + +=head1 NAME + +OpenSLX::OSPlugin::Engine - driver class for plugin handling. + +=head1 DESCRIPTION + +This class works as a driver for the installation/removal of plugins +into/from a vendor. + +Additionally, it provides the OS-Plugin support interface. + +=head1 PUBLIC METHODS + +=over + +=item new() + +Trivial constructor + +=cut + +sub new +{ + my $class = shift; + + my $self = {}; + + return bless $self, $class; +} + +=item initialize($pluginName, $vendorOSName ) + +Sets up basic data (I<$pluginName> and I<$vendorOSName>) as well as paths and +loads plugin. + +=cut + +sub initialize +{ + my $self = shift; + my $pluginName = shift; + my $vendorOSName = shift; + my $givenAttrs = shift || {}; + + $self->{'vendor-os-name'} = $vendorOSName; + + $self->{'vendor-os-path'} + = "$openslxConfig{'private-path'}/stage1/$vendorOSName"; + vlog(2, "vendor-OS path is '$self->{'vendor-os-path'}'"); + + if ($pluginName) { + $self->{'plugin-name'} = $pluginName; + $self->{'plugin-path'} + = "$openslxConfig{'base-path'}/lib/plugins/$pluginName"; + vlog(1, "plugin path is '$self->{'plugin-path'}'"); + + $self->{'plugin'} = $self->_loadPlugin(); + return if !$self->{'plugin'}; + + $self->{'chrooted-plugin-repo-path'} + = "$openslxConfig{'base-path'}/plugin-repo/$self->{'plugin-name'}"; + $self->{'plugin-repo-path'} + = "$self->{'vendor-os-path'}/$self->{'chrooted-plugin-repo-path'}"; + $self->{'chrooted-plugin-temp-path'} + = "/tmp/slx-plugin/$self->{'plugin-name'}"; + $self->{'plugin-temp-path'} + = "$self->{'vendor-os-path'}/$self->{'chrooted-plugin-temp-path'}"; + $self->{'chrooted-openslx-base-path'} = '/mnt/opt/openslx'; + $self->{'chrooted-openslx-config-path'} = '/mnt/etc/opt/openslx'; + + # merge attributes that were given on cmdline with the ones that + # already exist in the DB and finally with the default values + $self->{'plugin-attrs'} = { %$givenAttrs }; + my $defaultAttrs = $self->{plugin}->getDefaultAttrsForVendorOS( + $vendorOSName + ); + my $dbAttrs = $self->_fetchInstalledPluginAttrs($vendorOSName); + for my $attrName (keys %$defaultAttrs) { + next if exists $givenAttrs->{$attrName}; + $self->{'plugin-attrs'}->{$attrName} + = exists $dbAttrs->{$attrName} + ? $dbAttrs->{$attrName} + : $defaultAttrs->{$attrName}->{default}; + } + $self->{'vendorOS-attrs'} = $dbAttrs; + } + + return 1; +} + +=back + +=head2 Driver Interface + +The following methods are invoked by the slxos-plugin script in order to +install/remove a plugin into/from a vendor-OS: + +=over + +=item installPlugin() + +Invokes the plugin's installer method while chrooted into that vendor-OS. + +=cut + +sub installPlugin +{ + my $self = shift; + + $self->_checkIfRequiredPluginsAreInstalled(); + + # look for unknown attributes + my $attrs = $self->{'plugin-attrs'}; + my $attrInfos = $self->{plugin}->getAttrInfo(); + my @unknownAttrs = grep { !exists $attrInfos->{$_} } keys %$attrs; + if (@unknownAttrs) { + die _tr( + "The plugin '%s' does not support these attributes:\n\t%s", + $self->{'plugin-name'}, join(',', @unknownAttrs) + ); + } + + # check all attr-values against the regex of the attribute (if any) + my @attrProblems; + foreach my $attr (keys %$attrs) { + my $value = $attrs->{$attr}; + next if !defined $value; + my $attrInfo = $attrInfos->{$attr}; + my $regex = $attrInfo->{content_regex}; + if ($regex && $value !~ $regex) { + push @attrProblems, _tr( + "the value '%s' for attribute %s is not allowed.\nAllowed values are: %s", + $value, $attr, $attrInfo->{content_descr} + ); + } + } + + if (@attrProblems) { + my $complaint = join "\n", @attrProblems; + die $complaint; + } + + if ($self->{'vendor-os-name'} ne '<<>>') { + + # as the attrs may be changed by the plugin during installation, we + # have to find a way to pass them back to this process (remember: + # installation takes place in a forked process in order to do a chroot). + # We simply serialize the attributes into a temp file and deserialize + # it in the calling process. + my $serializedAttrsFile + = "$self->{'plugin-temp-path'}/serialized-attrs"; + my $chrootedSerializedAttrsFile + = "$self->{'chrooted-plugin-temp-path'}/serialized-attrs"; + + rmtree([ $self->{'plugin-repo-path'}, $self->{'plugin-temp-path'} ]); + mkpath([ $self->{'plugin-repo-path'}, $self->{'plugin-temp-path'} ]); + + # invoke plugin and let it prepare the installation + $self->{plugin}->preInstallationPhase( { + 'plugin-repo-path' => $self->{'plugin-repo-path'}, + 'plugin-temp-path' => $self->{'plugin-temp-path'}, + 'openslx-base-path' => $openslxConfig{'base-path'}, + 'openslx-config-path' => $openslxConfig{'config-path'}, + 'plugin-attrs' => $self->{'plugin-attrs'}, + 'vendor-os-path' => $self->{'vendor-os-path'}, + } ); + + # HACK: do a dummy serialization here in order to get Storable + # completely loaded (otherwise it will complain in the chroot about + # missing modules). + store $self->{'plugin-attrs'}, $serializedAttrsFile; + + $self->_callChrootedFunctionForPlugin( + sub { + # invoke plugin and let it install itself into vendor-OS + $self->{plugin}->installationPhase( { + 'plugin-repo-path' + => $self->{'chrooted-plugin-repo-path'}, + 'plugin-temp-path' + => $self->{'chrooted-plugin-temp-path'}, + 'openslx-base-path' + => $self->{'chrooted-openslx-base-path'}, + 'openslx-config-path' + => $self->{'chrooted-openslx-config-path'}, + 'plugin-attrs' + => $self->{'plugin-attrs'}, + } ); + + # serialize possibly changed attributes (executed inside chroot) + store $self->{'plugin-attrs'}, $chrootedSerializedAttrsFile; + } + ); + + # now retrieve (deserialize) the current attributes and store them + $self->{'plugin-attrs'} = retrieve $serializedAttrsFile; + + # cleanup temp path + rmtree([ $self->{'plugin-temp-path'} ]); + + # now update the vendorOS-attrs and let the plugin itself check the + # stage3 attrs + $self->{'vendorOS-attrs'} = $self->{'plugin-attrs'}; + $self->checkStage3AttrValues( + $self->{'plugin-attrs'}, \@attrProblems + ); + if (@attrProblems) { + my $complaint = join "\n", @attrProblems; + die $complaint; + } + } + + $self->_addInstalledPluginToDB(); + + return 1; +} + +=item removePlugin() + +Invokes the plugin's removal method while chrooted into that vendor-OS. + +=cut + +sub removePlugin +{ + my $self = shift; + + $self->_checkIfPluginIsRequiredByOthers(); + + if ($self->{'vendor-os-name'} ne '<<>>') { + + mkpath([ $self->{'plugin-repo-path'}, $self->{'plugin-temp-path'} ]); + + $self->_callChrootedFunctionForPlugin( + sub { + $self->{plugin}->removalPhase( { + 'plugin-repo-path' + => $self->{'chrooted-plugin-repo-path'}, + 'plugin-temp-path' + => $self->{'chrooted-plugin-temp-path'}, + 'openslx-base-path' + => $self->{'chrooted-openslx-base-path'}, + 'openslx-config-path' + => $self->{'chrooted-openslx-config-path'}, + 'plugin-attrs' + => $self->{'plugin-attrs'}, + } ); + } + ); + + # invoke plugin and let it prepare the installation + $self->{plugin}->postRemovalPhase( { + 'plugin-repo-path' => $self->{'plugin-repo-path'}, + 'plugin-temp-path' => $self->{'plugin-temp-path'}, + 'openslx-base-path' => $openslxConfig{'base-path'}, + 'openslx-config-path' => $openslxConfig{'config-path'}, + 'plugin-attrs' => $self->{'plugin-attrs'}, + 'vendor-os-path' => $self->{'vendor-os-path'}, + } ); + + rmtree([ $self->{'plugin-repo-path'}, $self->{'plugin-temp-path'} ]); + } + + $self->_removeInstalledPluginFromDB(); + + return 1; +} + +=item getInstalledPlugins() + +Returns the list of names of the plugins that are installed into the current +vendor-OS. + +=cut + +sub getInstalledPlugins +{ + my $self = shift; + + my $openslxDB = instantiateClass("OpenSLX::ConfigDB"); + $openslxDB->connect(); + my $vendorOSID = $self->_fetchVendorOSID($openslxDB); + my @installedPlugins = $openslxDB->fetchInstalledPlugins($vendorOSID); + $openslxDB->disconnect(); + + return @installedPlugins; +} + +=back + +=head2 Support Interface + +This is the plugin support interface for OS-plugins, which represents the +connection between a plugin's implementation and the rest of the OpenSLX system. + +Plugin implementations are meant to use this interface in order to find +out details about the current vendor-OS or download files or install packages. + +=over + +=item vendorOSName() + +Returns the name of the current vendor-OS. + +=cut + +sub vendorOSName +{ + my $self = shift; + + return $self->{'vendor-os-name'}; +} + +=item distroName() + +Returns the name of the distro that the current vendor-OS is based on. + +Each distro name always consists of the distro type, a dash and the +distro version, like 'suse-10.2' or 'ubuntu-7.04'. + +=cut + +sub distroName +{ + my $self = shift; + + return $self->_osSetupEngine()->distroName(); +} + +=item downloadFile($fileURL, $targetPath, $wgetOptions) + +Invokes busybox's wget to download a file from the given URL. + +=over + +=item I<$fileURL> + +The URL of the file to download. + +=item I<$targetPath> [optional] + +The directory where the file should be downloaded into. The default is the +current plugin's temp directory. + +=item I<$wgetOptions> [optional] + +Any other options you'd like to pass to wget. + +=item I + +If the downloaded was successful this method returns C<1>, otherwise it dies. + +=back + +=cut + +sub downloadFile +{ + my $self = shift; + my $fileURL = shift || return; + my $targetPath = shift || $self->{'chrooted-plugin-temp-path'}; + my $wgetOptions = shift || ''; + + my $busybox = $self->_osSetupEngine()->busyboxBinary(); + + if (slxsystem("$busybox wget -P $targetPath $wgetOptions $fileURL")) { + die _tr('unable to download file "%s"! (%s)', $fileURL, $!); + } + + return 1; +} + +=item getInstalledPackages() + +Returns the list of names of the packages (as an array) that are already +installed in the vendor-OS. +Useful if a plugin wants to find out whether or not it has to +install additional packages. + +=cut + +sub getInstalledPackages +{ + my $self = shift; + + my $packager = $self->_osSetupEngine()->packager(); + return if !$packager; + + return $packager->getInstalledPackages(); +} + +=item getInstallablePackagesForSelection() + +Looks at the selection with the given name and returns the list of names of the +packages (as one string separated by spaces) that need to be installed in order +to complete the selection. + +=cut + +sub getInstallablePackagesForSelection +{ + my $self = shift; + my $selection = shift; + + return $self->_osSetupEngine()->getInstallablePackagesForSelection( + $selection + ); +} + +=item installPackages($packages) + +Installs the given packages into the vendor-OS. + +N.B: Since this method uses the meta-packager of the vendor-OS, package +dependencies will be determined and solved automatically. + +=over + +=item I<$packages> + +Contains a list of package names (separated by spaces) that shall be installed. + +=item I + +If the packages have been installed successfully this method return 1, +otherwise it dies. + +=back + +=cut + +sub installPackages +{ + my $self = shift; + my $packages = shift; + + return if !$packages; + + my $metaPackager = $self->_osSetupEngine()->metaPackager(); + return if !$metaPackager; + + return $metaPackager->installPackages($packages, 1); +} + +=item removePackages($packages) + +Removes the given packages from the vendor-OS. + +=over + +=item I<$packages> [ARRAY-ref] + +Contains a list of package names (separated by spaces) that shall be removed. + +=item I + +If the packages have been removed successfully this method return 1, +otherwise it dies. + +=back + +=cut + +sub removePackages +{ + my $self = shift; + my $packages = shift; + + return if !$packages; + + my $metaPackager = $self->_osSetupEngine()->metaPackager(); + return if !$metaPackager; + + return $metaPackager->removePackages($packages); +} + +=back + +=head2 Driver Interface + +The following methods are invoked by the slxos-plugin script in order to +install/remove a plugin into/from a vendor-OS: + +=over + +=item checkStage3AttrValues() + +Checks if the stage3 values given in B<$stage3Attrs> are allowed and make sense. + +This method gets also invoked whenever changes by slxconfig were made (passing +in only the stage3 attributes the user tried to change) and by the config +demuxer (passing in all stage3 attributes for the system currently being +demuxed). + +If all values are ok, this method returns 1 - if not, it extends the given +problems array-ref with the problems that were found (and returns undef). + +This method chroots into the vendor-OS and then asks the plugin itself to check +the attributes. + +=cut + +sub checkStage3AttrValues +{ + my $self = shift; + my $stage3Attrs = shift; + my $problemsOut = shift; + + # we have to pass any problems back to this process (remember: + # installation takes place in a forked process in order to do a chroot). + # We simply serialize the problems into a temp file and deserialize + # it in the calling process. + my $serializedProblemsFile + = "$self->{'plugin-temp-path'}/serialized-problems"; + my $chrootedSerializedProblemsFile + = "$self->{'chrooted-plugin-temp-path'}/serialized-problems"; + + mkpath([ $self->{'plugin-repo-path'}, $self->{'plugin-temp-path'} ]); + + # HACK: do a dummy serialization here in order to get Storable + # completely loaded (otherwise it will complain in the chroot about + # missing modules). + store [], $serializedProblemsFile; + + $self->_callChrootedFunctionForPlugin( + sub { + # let plugin check by itself + my $problems = $self->{plugin}->checkStage3AttrValues( + $stage3Attrs, $self->{'vendorOS-attrs'} + ); + + # serialize list of problems (executed inside chroot) + store($problems, $chrootedSerializedProblemsFile) if $problems; + } + ); + + # now retrieve (deserialize) the found problems and pass them on + my $problems = retrieve $serializedProblemsFile; + rmtree([ $self->{'plugin-temp-path'} ]); + if ($problems && ref($problems) eq 'ARRAY' && @$problems) { + push @$problemsOut, @$problems; + return; + } + + return 1; +} + +=back + +=cut + +sub _loadPlugin +{ + my $self = shift; + + my $pluginModule = "OpenSLX::OSPlugin::$self->{'plugin-name'}"; + my $plugin = instantiateClass( + $pluginModule, { + acceptMissing => 1, + pathToClass => $self->{'plugin-path'}, + } + ); + return if !$plugin; + + # if there's a distro folder, instantiate the most appropriate distro class + my $distro; + if ($self->{'vendor-os-name'} ne '<<>>' + && -d "$self->{'plugin-path'}/OpenSLX/Distro") { + my $pluginBasePath = "$openslxConfig{'base-path'}/lib/plugins"; + my $distroScope = $plugin->{name} . '::OpenSLX::Distro'; + $distro = loadDistroModule({ + distroName => $self->distroName(), + distroScope => $distroScope, + pathToClass => $pluginBasePath, + }); + if (!$distro) { + die _tr( + 'unable to load any distro module for vendor-OS %s in plugin %s', + $self->{'vendor-os-name'}, $plugin->{name} + ); + } + $distro->initialize($self); + } + + $plugin->initialize($self, $distro); + + return $plugin; +} + +sub _callChrootedFunctionForPlugin +{ + my $self = shift; + my $function = shift; + + # create os-setup engine here in order to block access to the vendor-OS + # via other processes (which could cause problems) + my $osSetupEngine = $self->_osSetupEngine(); + + my @bindmounts; + my @chrootPerlIncludes; + + # setup list of perl modules we want to bind into chroot + push @chrootPerlIncludes, "/mnt/opt/openslx/lib"; + + push @bindmounts, { + 'source' => $Config{privlibexp}, + 'target' => "$self->{'vendor-os-path'}/mnt/perl/privlibexp" + }; + push @chrootPerlIncludes, "/mnt/perl/privlibexp"; + push @bindmounts, { + 'source' => $Config{archlibexp}, + 'target' => "$self->{'vendor-os-path'}/mnt/perl/archlibexp" + }; + push @chrootPerlIncludes, "/mnt/perl/archlibexp"; + push @bindmounts, { + 'source' => $Config{vendorlibexp}, + 'target' => "$self->{'vendor-os-path'}/mnt/perl/vendorlibexp" + }; + push @chrootPerlIncludes, "/mnt/perl/vendorlibexp"; + push @bindmounts, { + 'source' => $Config{vendorarchexp}, + 'target' => "$self->{'vendor-os-path'}/mnt/perl/vendorarchexp" + }; + push @chrootPerlIncludes, "/mnt/perl/vendorarchexp"; + + # prepare openslx bind mounts + push @bindmounts, { + 'source' => $openslxConfig{'base-path'}, + 'target' => "$self->{'vendor-os-path'}/mnt/opt/openslx" + }; + push @bindmounts, { + 'source' => $openslxConfig{'config-path'}, + 'target' => "$self->{'vendor-os-path'}/mnt/etc/opt/openslx" + }; + + # create mountpoints + foreach (@bindmounts) { + mkpath($_->{'target'}); + } + + my $pluginSession = OpenSLX::ScopedResource->new({ + name => 'osplugin::session', + acquire => sub { + # bind mount perl includes, openslx base and config paths into vendor-OS + foreach (@bindmounts) { + slxsystem("mount -o bind $_->{'source'} $_->{'target'}") == 0 + or die _tr( + "unable to bind mount '%s' to '%s'! (%s)", + $_->{'source'}, $_->{'target'}, $! + ); + } + + # add mounted perl includes to @INC + foreach (@chrootPerlIncludes) { + unshift @INC, $_; + } + 1 + }, + release => sub { + # cleanup @INC again + while (my $perlinc = pop(@chrootPerlIncludes)) { + if ($INC[0] eq $perlinc) { + shift @INC; + } + } + + # unmount bindmounts + foreach (@bindmounts) { + slxsystem("umount $_->{'target'}") == 0 + or die _tr( + "unable to umount '%s'! (%s)", + $_->{'target'}, $! + ); + } + 1 + }, + }); + + # now let plugin install itself into vendor-OS + $osSetupEngine->callChrootedFunctionForVendorOS($function); + + return; +} + +sub _addInstalledPluginToDB +{ + my $self = shift; + + my $openslxDB = instantiateClass("OpenSLX::ConfigDB"); + $openslxDB->connect(); + my $vendorOSID = $self->_fetchVendorOSID($openslxDB); + $openslxDB->addInstalledPlugin( + $vendorOSID, $self->{'plugin-name'}, $self->{'plugin-attrs'} + ); + $openslxDB->disconnect(); + + return 1; +} + +sub _checkIfRequiredPluginsAreInstalled +{ + my $self = shift; + + my $requiredPlugins = $self->{plugin}->getInfo()->{required} || []; + return 1 if !@$requiredPlugins; + + my $openslxDB = instantiateClass("OpenSLX::ConfigDB"); + $openslxDB->connect(); + my $vendorOSID = $self->_fetchVendorOSID($openslxDB); + my @installedPlugins = $openslxDB->fetchInstalledPlugins($vendorOSID); + $openslxDB->disconnect(); + + my @missingPlugins + = grep { + my $required = $_; + ! grep { $_->{plugin_name} eq $required } @installedPlugins; + } + @$requiredPlugins; + + if (@missingPlugins) { + die _tr( + 'the plugin "%s" requires the following plugins to be installed first: "%s"!', + $self->{'plugin-name'}, join(',', @missingPlugins) + ); + } + + return 1; +} + +sub _checkIfPluginIsRequiredByOthers +{ + my $self = shift; + + my $openslxDB = instantiateClass("OpenSLX::ConfigDB"); + $openslxDB->connect(); + my $vendorOSID = $self->_fetchVendorOSID($openslxDB); + my @installedPlugins = $openslxDB->fetchInstalledPlugins($vendorOSID); + $openslxDB->disconnect(); + + my @lockingPlugins + = grep { + my $installed + = OpenSLX::OSPlugin::Roster->getPlugin($_->{plugin_name}); + my $requiredByInstalled + = $installed + ? ($installed->getInfo()->{required} || []) + : []; + grep { $_ eq $self->{'plugin-name'} } @$requiredByInstalled; + } + @installedPlugins; + + if (@lockingPlugins) { + die _tr( + 'the plugin "%s" is required by the following plugins: "%s"!', + $self->{'plugin-name'}, + join(',', map { $_->{plugin_name} } @lockingPlugins) + ); + } + + return 1; +} + +sub _fetchInstalledPluginAttrs +{ + my $self = shift; + + my $openslxDB = instantiateClass("OpenSLX::ConfigDB"); + $openslxDB->connect(); + my $vendorOSID = $self->_fetchVendorOSID($openslxDB); + my $installedPlugin = $openslxDB->fetchInstalledPlugins( + $vendorOSID, $self->{'plugin-name'} + ); + $openslxDB->disconnect(); + + return {} if !$installedPlugin; + return $installedPlugin->{attrs}; +} + +sub _removeInstalledPluginFromDB +{ + my $self = shift; + + my $openslxDB = instantiateClass("OpenSLX::ConfigDB"); + $openslxDB->connect(); + my $vendorOSID = $self->_fetchVendorOSID($openslxDB); + $openslxDB->removeInstalledPlugin($vendorOSID, $self->{'plugin-name'}); + $openslxDB->disconnect(); + + return 1; +} + +sub _fetchVendorOSID +{ + my $self = shift; + my $openslxDB = shift; + + if ($self->{'vendor-os-name'} eq '<<>>') { + return 0; + } + + my $vendorOS = $openslxDB->fetchVendorOSByFilter( { + name => $self->{'vendor-os-name'}, + } ); + if (!$vendorOS) { + die _tr( + 'unable to find vendor-OS "%s" in DB!', $self->{'vendor-os-name'} + ); + } + + return $vendorOS->{id}; +} + +sub _osSetupEngine +{ + my $self = shift; + + if (!$self->{'ossetup-engine'}) { + # create ossetup-engine for given vendor-OS: + my $osSetupEngine = OpenSLX::OSSetup::Engine->new; + $osSetupEngine->initialize($self->{'vendor-os-name'}, 'plugin'); + $self->{'ossetup-engine'} = $osSetupEngine; + } + + return $self->{'ossetup-engine'}; +} + +1; diff --git a/src/os-plugins/OpenSLX/OSPlugin/Roster.pm b/src/os-plugins/OpenSLX/OSPlugin/Roster.pm new file mode 100644 index 00000000..7bfed044 --- /dev/null +++ b/src/os-plugins/OpenSLX/OSPlugin/Roster.pm @@ -0,0 +1,213 @@ +# Copyright (c) 2006, 2007 - 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/ +# ----------------------------------------------------------------------------- +# OSPlugin::Roster.pm +# - provides information about all available plugins +# ----------------------------------------------------------------------------- +package OpenSLX::OSPlugin::Roster; + +use strict; +use warnings; + +use OpenSLX::Basics; +use Clone qw(clone); + +my %plugins; + +=item C + +Returns a hash that keys the names of available plugins to their info hash. + +=cut + +sub getAvailablePlugins +{ + my $class = shift; + + $class->_init() if !%plugins; + + my %pluginInfo; + foreach my $pluginName (keys %plugins) { + $pluginInfo{$pluginName} = $plugins{$pluginName}->getInfo(); + } + return \%pluginInfo; +} + +=item C + +Returns an instance of the plugin with the given name + +=cut + +sub getPlugin +{ + my $class = shift; + my $pluginName = shift; + + $class->_init() if !%plugins; + + my $plugin = $plugins{$pluginName}; + return if !$plugin; + + return clone($plugin); +} + +=item C + +Returns a hash that contains info about the attributes support by the +given plugin + +=cut + +sub getPluginAttrInfo +{ + my $class = shift; + my $pluginName = shift; + + $class->_init() if !%plugins; + + return if !$plugins{$pluginName}; + + return $plugins{$pluginName}->getAttrInfo(); +} + +=item C + +Fetches attribute info from all available plugins and adds it to the given +hash-ref. + +If a plugin name has been given, only the attributes of that plugin will be +added. + +=over + +=item Return Value + +1 + +=back + +=cut + +sub addAllAttributesToHash +{ + my $class = shift; + my $attrInfo = shift; + my $pluginName = shift; + + return $class->_addAttributesToHash($attrInfo, $pluginName, sub { 1 } ); +} + +=item C + +Fetches attribute info relevant for stage1 (i.e. vendor-OS-attributes) +from all available plugins and adds it to the given hash-ref. + +If a plugin name has been given, only the attributes of that plugin will be +added. + +=over + +=item Return Value + +1 + +=back + +=cut + +sub addAllStage1AttributesToHash +{ + my $class = shift; + my $attrInfo = shift; + my $pluginName = shift; + + return $class->_addAttributesToHash($attrInfo, $pluginName, sub { + my $attr = shift; + return $attr->{applies_to_vendor_os}; + } ); +} + +=item C + +Fetches attribute info relevant for stage3 (i.e. system- or client-attributes) +from all available plugins and adds it to the given hash-ref. + +If a plugin name has been given, only the attributes of that plugin will be +added. + +=over + +=item Return Value + +1 + +=back + +=cut + +sub addAllStage3AttributesToHash +{ + my $class = shift; + my $attrInfo = shift; + my $pluginName = shift; + + return $class->_addAttributesToHash($attrInfo, $pluginName, sub { + my $attr = shift; + return $attr->{applies_to_systems} || $attr->{applies_to_clients}; + } ); +} + +sub _addAttributesToHash +{ + my $class = shift; + my $attrInfo = shift; + my $pluginName = shift; + my $testFunc = shift; + + $class->_init() if !%plugins; + + foreach my $plugin (values %plugins) { + next if $pluginName && $plugin->{name} ne $pluginName; + my $pluginAttrInfo = $plugin->getAttrInfo(); + foreach my $attr (keys %$pluginAttrInfo) { + next if !$testFunc->($pluginAttrInfo->{$attr}); + $attrInfo->{$attr} = clone($pluginAttrInfo->{$attr}); + } + } + return 1; +} + +sub _init +{ + my $class = shift; + + %plugins = (); + my $pluginPath = "$openslxConfig{'base-path'}/lib/plugins"; + foreach my $modulePath (glob("$pluginPath/*")) { + next if $modulePath !~ m{/([^/]+)$}; + my $pluginName = $1; + if (!-e "$modulePath/OpenSLX/OSPlugin/$pluginName.pm") { + vlog( + 1, + "skipped plugin-folder $modulePath as no corresponding perl " + . "module could be found." + ); + next; + } + my $class = "OpenSLX::OSPlugin::$pluginName"; + vlog(2, "loading plugin $class from path '$modulePath'"); + my $plugin = instantiateClass($class, { pathToClass => $modulePath }); + $plugins{$pluginName} = $plugin; + } + return; +} + +1; diff --git a/src/os-plugins/plugins/bootsplash/OpenSLX/OSPlugin/bootsplash.pm b/src/os-plugins/plugins/bootsplash/OpenSLX/OSPlugin/bootsplash.pm new file mode 100644 index 00000000..ef1db778 --- /dev/null +++ b/src/os-plugins/plugins/bootsplash/OpenSLX/OSPlugin/bootsplash.pm @@ -0,0 +1,253 @@ +# Copyright (c) 2007..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/ +# ----------------------------------------------------------------------------- +# bootsplash.pm +# - implementation of the 'bootsplash' plugin, which installs splashy +# into the ramfs, including changeing theme +# ----------------------------------------------------------------------------- +package OpenSLX::OSPlugin::bootsplash; + +use strict; +use warnings; + +use base qw(OpenSLX::OSPlugin::Base); + +use File::Path; + +use OpenSLX::Basics; +use OpenSLX::Utils; +use OpenSLX::DistroUtils; + +sub new +{ + my $class = shift; + + my $self = { + name => 'bootsplash', + }; + + mkpath("$openslxConfig{'config-path'}/plugins/bootsplash/themes"); + + return bless $self, $class; +} + +sub getInfo +{ + my $self = shift; + + return { + description => unshiftHereDoc(<<' End-of-Here'), + Installs Splashy as bootsplash into ramfs and sets a Theme. + End-of-Here + precedence => 30, + }; +} + +sub getAttrInfo +{ + my $self = shift; + + return { + 'bootsplash::active' => { + applies_to_systems => 1, + applies_to_clients => 1, + description => unshiftHereDoc(<<' End-of-Here'), + should the 'bootsplash'-plugin be executed during boot? + End-of-Here + content_regex => qr{^(0|1)$}, + content_descr => '1 means active - 0 means inactive', + default => '1', + }, + + 'bootsplash::theme' => { + applies_to_systems => 1, + applies_to_clients => 1, + description => unshiftHereDoc(<<' End-of-Here'), + name of the theme to apply to bootsplash (unset for no theme) + End-of-Here + content_regex => undef, + content_descr => undef, + default => 'openslx', + }, + }; +} + +sub suggestAdditionalKernelParams +{ + my $self = shift; + my $makeInitRamFSEngine = shift; + + my @suggestedParams; + + # add vga=0x317 unless explicit vga-mode is already set + if (!$makeInitRamFSEngine->haveKernelParam(qr{\bvga=})) { + push @suggestedParams, 'vga=0x317'; + } + + # add quiet, if not already set + if (!$makeInitRamFSEngine->haveKernelParam('quiet')) { + push @suggestedParams, 'quiet'; + } + + return @suggestedParams; +} + +sub suggestAdditionalKernelModules +{ + my $self = shift; + my $makeInitRamFSEngine = shift; + + my @suggestedModules; + + # Ubuntu needs vesafb and fbcon (which drags along some others) + #if ($makeInitRamFSEngine->{'distro-name'} =~ m{^ubuntu}i) { + push @suggestedModules, qw( i810 i830 i915 mga nouveau r128 radeon savage sis tdfx ttm via drm fbcon vesafb ); + #} + + return @suggestedModules; +} + +sub installationPhase +{ + my $self = shift; + my $info = shift; + + $self->{pluginRepositoryPath} = $info->{'plugin-repo-path'}; + $self->{openslxBasePath} = $info->{'openslx-base-path'}; + + my $splashyPath = + "$self->{openslxBasePath}/lib/plugins/bootsplash/files"; + my $pluginRepoPath = "$self->{pluginRepositoryPath}"; + + my $initFile = newInitFile(); + my $do_stop = unshiftHereDoc(<<' End-of-Here'); + /opt/openslx/plugin-repo/bootsplash/bin/splashy shutdown + sleep 1 + /opt/openslx/plugin-repo/bootsplash/bin/splashy_update \ + "progress 100" 2>/dev/null + End-of-Here + + # add helper functions to initfile + # first parameter name of the function + # second parameter content of the function + $initFile->addFunction('do_start', " : # do nothing here"); + $initFile->addFunction('do_stop', $do_stop); + $initFile->addFunction('do_restart', " : # do nothing here"); + + # place a call of the helper function in the stop block + # of the init file + # first parameter name of the function + # second parameter name of the block + $initFile->addFunctionCall('do_start', 'start'); + $initFile->addFunctionCall('do_stop', 'stop'); + $initFile->addFunctionCall('do_restart', 'restart'); + + my $distro = (split('-',$self->{'os-plugin-engine'}->distroName()))[0]; + + # write initfile to filesystem + spitFile( + "$pluginRepoPath/bootsplash.halt", + getInitFileForDistro($initFile, ucfirst($distro)) + ); + + # copy splashy(_update) into plugin-repo folder + mkpath("$pluginRepoPath/sbin"); + mkpath("$pluginRepoPath/lib"); + mkpath("$pluginRepoPath/usr/lib"); + slxsystem("cp -a $splashyPath/sbin/* $pluginRepoPath/sbin/; + cp -p $splashyPath/lib/* $pluginRepoPath/lib/; + cp -p $splashyPath/usr/lib/* $pluginRepoPath/usr/lib/") == 0 + or die _tr( + "unable to copy splashy to $pluginRepoPath" + ); + # create a proper (distro specific) runlevel script for halt + #my $initfile = newInitFile(); + #$initfile->addDaemon(""); + # + #my $runlevelscript = getInitFileForDistro($initfile, "ubuntu"); + + return; +} + +sub removalPhase +{ + my $self = shift; + my $info = shift; + + return; +} + + +sub copyRequiredFilesIntoInitramfs +{ + my $self = shift; + my $targetPath = shift; + my $attrs = shift; + my $makeInitRamFSEngine = shift; + + my $bootsplashDir = "$openslxConfig{'base-path'}/lib/plugins/bootsplash"; + my $bootsplashConfigDir + = "$openslxConfig{'config-path'}/plugins/bootsplash"; + my $bootsplashTheme = $attrs->{'bootsplash::theme'} || ''; + my $splashyThemeDir = ''; + + if ($bootsplashTheme) { + my $bootsplashThemeDir = "$bootsplashDir/files/themes/$bootsplashTheme"; + my $altThemeDir = "$bootsplashConfigDir/themes/$bootsplashTheme"; + if (-d $bootsplashThemeDir) { + $splashyThemeDir = "$bootsplashThemeDir"; + } + elsif (-d $altThemeDir) { + $splashyThemeDir = "$altThemeDir"; + } + if (-d $splashyThemeDir) { + my $splashyPath = "$bootsplashDir/files"; + $makeInitRamFSEngine->addCMD( + "cp -p $splashyPath/sbin/splashy* $targetPath/sbin/; + cp -p $splashyPath/lib/lib* $targetPath/lib/; + cp -p $splashyPath/usr/lib/lib* $targetPath/usr/lib/" + ); + $makeInitRamFSEngine->addCMD( + "mkdir -p $targetPath/etc/splashy/themes" + ); + $makeInitRamFSEngine->addCMD( + "cp -a $splashyThemeDir $targetPath/etc/splashy/themes/" + ); + my $defSplashyTheme = "/etc/splashy/themes/$bootsplashTheme"; + my $splashyConfig = unshiftHereDoc(<<" End-of-Here"); + + + + + /etc/splashy/themes + + $bootsplashTheme + + $defSplashyTheme + /etc/splashy/splashy.pid + /dev/.initramfs/splashy.fifo + + End-of-Here + $makeInitRamFSEngine->addCMD( { + file => "$targetPath/etc/splashy/config.xml", + content => $splashyConfig, + } ); + } + } + else { + $bootsplashTheme = ''; + } + + vlog(1, _tr("bootsplash-plugin: bootsplash=%s", $bootsplashTheme)); + + return; +} + +1; diff --git a/src/os-plugins/plugins/bootsplash/XX_bootsplash.sh b/src/os-plugins/plugins/bootsplash/XX_bootsplash.sh new file mode 100644 index 00000000..372e025d --- /dev/null +++ b/src/os-plugins/plugins/bootsplash/XX_bootsplash.sh @@ -0,0 +1,56 @@ +# Copyright (c) 2007..2008 - RZ Uni Freiburg +# Copyright (c) 2008 - 2009 OpenSLX GmbH +# +# This program/file 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 feedback to feedback@openslx.org +# +# General information about OpenSLX can be found at http://openslx.org +# +# stage3 part of 'bootsplash' plugin - the runlevel script +# +# script is included from init via the "." load function - thus it has all +# variables and functions available + +if [ -e /initramfs/plugin-conf/bootsplash.conf ]; then + . /initramfs/plugin-conf/bootsplash.conf + if [ $bootsplash_active -ne 0 ]; then + if [ ${no_bootsplash} -eq 0 ]; then + # create a runlevelscript that will stop splashy before the start of KDM + d_mkrlscript init splashy.boot "" + echo -e "\tLD_LIBRARY_PATH=/opt/openslx/uclib-rootfs/lib/ \ + /opt/openslx/plugin-repo/bootsplash/sbin/splashy_update \ + exit 2>/dev/null \ + \n\ttype killall >/dev/null 2>&1 && killall -9 splashy" \ + >>/mnt/etc/init.d/splashy.boot + d_mkrlscript close splashy.boot "" + + cp /mnt/opt/openslx/plugin-repo/bootsplash/bootsplash.halt \ + /mnt/etc/init.d/bootsplash.halt + chmod 744 /mnt/etc/init.d/bootsplash.halt + cp -a /etc/splashy /mnt/etc/ + rllinker "bootsplash.halt" 1 1 + + # fix for ubuntu 1004+ + for i in init init.inactive; do + for j in kdm gdm xdm lxdm; do + dmfile=/mnt/etc/${i}/${j}.conf + if [ -f $dmfile ]; then + sed -e "s,^script.*,script\n\t#0x42#," \ + -e "s,#0x42#,# shutdown splashy - added by splashy plugin\n\t#0x42#," \ + -e "s,#0x42#,if [ ! \"x$(ps aux |grep splashy |grep -v grep | wc -l)\" -eq \"x0\" ]; then\n\t#0x42#, " \ + -e "s,#0x42#, LD_LIBRARY_PATH=/opt/openslx/uclib-rootfs/lib/ \\\\\n\t#0x42#," \ + -e "s,#0x42#, /opt/openslx/plugin-repo/bootsplash/sbin/splashy_update exit \\\\\n\t#0x42#," \ + -e "s,#0x42#, 2>/dev/null \n\t#0x42#," \ + -e "s,#0x42#,fi \n\t#0x42#," \ + -e "s,#0x42#,#splashy-stop-done#," \ + -i $dmfile 2>/dev/null & + fi + done + done + fi + fi +fi + diff --git a/src/os-plugins/plugins/bootsplash/files/lib/libglib-2.0.so.0 b/src/os-plugins/plugins/bootsplash/files/lib/libglib-2.0.so.0 new file mode 100644 index 00000000..e96b345b Binary files /dev/null and b/src/os-plugins/plugins/bootsplash/files/lib/libglib-2.0.so.0 differ diff --git a/src/os-plugins/plugins/bootsplash/files/lib/libsplashy.so.1 b/src/os-plugins/plugins/bootsplash/files/lib/libsplashy.so.1 new file mode 100644 index 00000000..817c6d2d Binary files /dev/null and b/src/os-plugins/plugins/bootsplash/files/lib/libsplashy.so.1 differ diff --git a/src/os-plugins/plugins/bootsplash/files/lib/libsplashycnf.so.1 b/src/os-plugins/plugins/bootsplash/files/lib/libsplashycnf.so.1 new file mode 100644 index 00000000..71c251d1 Binary files /dev/null and b/src/os-plugins/plugins/bootsplash/files/lib/libsplashycnf.so.1 differ diff --git a/src/os-plugins/plugins/bootsplash/files/sbin/splashy b/src/os-plugins/plugins/bootsplash/files/sbin/splashy new file mode 100755 index 00000000..fee26325 Binary files /dev/null and b/src/os-plugins/plugins/bootsplash/files/sbin/splashy differ diff --git a/src/os-plugins/plugins/bootsplash/files/sbin/splashy_config b/src/os-plugins/plugins/bootsplash/files/sbin/splashy_config new file mode 100755 index 00000000..1e048366 Binary files /dev/null and b/src/os-plugins/plugins/bootsplash/files/sbin/splashy_config differ diff --git a/src/os-plugins/plugins/bootsplash/files/sbin/splashy_update b/src/os-plugins/plugins/bootsplash/files/sbin/splashy_update new file mode 100755 index 00000000..cb624fde Binary files /dev/null and b/src/os-plugins/plugins/bootsplash/files/sbin/splashy_update differ diff --git a/src/os-plugins/plugins/bootsplash/files/themes/openslx/blank.ttf b/src/os-plugins/plugins/bootsplash/files/themes/openslx/blank.ttf new file mode 100644 index 00000000..e69de29b diff --git a/src/os-plugins/plugins/bootsplash/files/themes/openslx/openslx.png b/src/os-plugins/plugins/bootsplash/files/themes/openslx/openslx.png new file mode 100644 index 00000000..e7f996c6 Binary files /dev/null and b/src/os-plugins/plugins/bootsplash/files/themes/openslx/openslx.png differ diff --git a/src/os-plugins/plugins/bootsplash/files/themes/openslx/theme.xml b/src/os-plugins/plugins/bootsplash/files/themes/openslx/theme.xml new file mode 100644 index 00000000..48854551 --- /dev/null +++ b/src/os-plugins/plugins/bootsplash/files/themes/openslx/theme.xml @@ -0,0 +1,138 @@ + + + + + + openslx + 0.2 + OpenSLX Splashy Theme + http://openslx.com + mj0@uni-freiburg.de + + + + + 0 + 42 + 100 + 16 + + + + 128 + 147 + 161 + 255 + + + + no + + 0 + 0 + 0 + 0 + + + + + + 240 + 240 + 240 + 255 + + + + forward + backward + forward + backward + + + yes + yes + yes + yes + + + + + openslx.png + openslx.png + openslx.png + openslx.png + openslx.png + + + + 0 + 0 + 0 + 0 + + + + + no + + + 1 + 61 + 98 + 38 + + + + 0 + 0 + 0 + 0 + + + + no + + 0 + 0 + 0 + 0 + + + + + + blank.ttf + 2 + + + + 62 + 93 + 114 + 0 + + + + no + no + no + diff --git a/src/os-plugins/plugins/bootsplash/files/usr/lib/libdirect-1.2.so.9 b/src/os-plugins/plugins/bootsplash/files/usr/lib/libdirect-1.2.so.9 new file mode 100644 index 00000000..fbe2d611 Binary files /dev/null and b/src/os-plugins/plugins/bootsplash/files/usr/lib/libdirect-1.2.so.9 differ diff --git a/src/os-plugins/plugins/bootsplash/files/usr/lib/libdirectfb-1.2.so.9 b/src/os-plugins/plugins/bootsplash/files/usr/lib/libdirectfb-1.2.so.9 new file mode 100644 index 00000000..76b77716 Binary files /dev/null and b/src/os-plugins/plugins/bootsplash/files/usr/lib/libdirectfb-1.2.so.9 differ diff --git a/src/os-plugins/plugins/bootsplash/files/usr/lib/libmagic.so.1 b/src/os-plugins/plugins/bootsplash/files/usr/lib/libmagic.so.1 new file mode 100644 index 00000000..513b3508 Binary files /dev/null and b/src/os-plugins/plugins/bootsplash/files/usr/lib/libmagic.so.1 differ diff --git a/src/os-plugins/plugins/bootsplash/init-hooks/05-have-kernelvars/bootsplash.sh b/src/os-plugins/plugins/bootsplash/init-hooks/05-have-kernelvars/bootsplash.sh new file mode 100644 index 00000000..a54fde96 --- /dev/null +++ b/src/os-plugins/plugins/bootsplash/init-hooks/05-have-kernelvars/bootsplash.sh @@ -0,0 +1,18 @@ +# splashy depends on /proc/fb with VESA +# only activate with kernel option quiet and no debuglevel +if grep -q ".*" /proc/fb > /dev/null 2>&1 \ + && grep -qie " quiet " -qie "^quiet " -qie " quiet$" /proc/cmdline \ + > /dev/null 2>&1 \ + && [ $DEBUGLEVEL -eq 0 ] \ + && [ -e /bin/splashy ] ; then + export no_bootsplash=0 +else + export no_bootsplash=1 +fi + +if [ ${no_bootsplash} -eq 0 ]; then + /bin/splashy boot 2>/dev/null + # add splashy.boot runlevel script + export D_SPLASHY=splashy.boot +fi + diff --git a/src/os-plugins/plugins/bootsplash/init-hooks/10-nw-if-config/bootsplash.sh b/src/os-plugins/plugins/bootsplash/init-hooks/10-nw-if-config/bootsplash.sh new file mode 100644 index 00000000..7f3d563e --- /dev/null +++ b/src/os-plugins/plugins/bootsplash/init-hooks/10-nw-if-config/bootsplash.sh @@ -0,0 +1 @@ +[ ${no_bootsplash} -eq 0 ] && /bin/splashy_update "progress 10" >/dev/null 2>&1 diff --git a/src/os-plugins/plugins/bootsplash/init-hooks/20-nw-bridge-config/bootsplash.sh b/src/os-plugins/plugins/bootsplash/init-hooks/20-nw-bridge-config/bootsplash.sh new file mode 100644 index 00000000..d8155ff0 --- /dev/null +++ b/src/os-plugins/plugins/bootsplash/init-hooks/20-nw-bridge-config/bootsplash.sh @@ -0,0 +1 @@ +[ ${no_bootsplash} -eq 0 ] && /bin/splashy_update "progress 20" >/dev/null 2>&1 diff --git a/src/os-plugins/plugins/bootsplash/init-hooks/25-have-ip-config/bootsplash.sh b/src/os-plugins/plugins/bootsplash/init-hooks/25-have-ip-config/bootsplash.sh new file mode 100644 index 00000000..be6ac567 --- /dev/null +++ b/src/os-plugins/plugins/bootsplash/init-hooks/25-have-ip-config/bootsplash.sh @@ -0,0 +1 @@ +[ ${no_bootsplash} -eq 0 ] && /bin/splashy_update "progress 25" >/dev/null 2>&1 diff --git a/src/os-plugins/plugins/bootsplash/init-hooks/35-have-network-root/bootsplash.sh b/src/os-plugins/plugins/bootsplash/init-hooks/35-have-network-root/bootsplash.sh new file mode 100644 index 00000000..606eb694 --- /dev/null +++ b/src/os-plugins/plugins/bootsplash/init-hooks/35-have-network-root/bootsplash.sh @@ -0,0 +1 @@ +[ ${no_bootsplash} -eq 0 ] && /bin/splashy_update "progress 35" >/dev/null 2>&1 diff --git a/src/os-plugins/plugins/bootsplash/init-hooks/40-started-hw-config/bootsplash.sh b/src/os-plugins/plugins/bootsplash/init-hooks/40-started-hw-config/bootsplash.sh new file mode 100644 index 00000000..d5fc62ec --- /dev/null +++ b/src/os-plugins/plugins/bootsplash/init-hooks/40-started-hw-config/bootsplash.sh @@ -0,0 +1 @@ +[ ${no_bootsplash} -eq 0 ] && /bin/splashy_update "progress 40" >/dev/null 2>&1 diff --git a/src/os-plugins/plugins/bootsplash/init-hooks/50-have-layered-fs/bootsplash.sh b/src/os-plugins/plugins/bootsplash/init-hooks/50-have-layered-fs/bootsplash.sh new file mode 100644 index 00000000..4b7e9c78 --- /dev/null +++ b/src/os-plugins/plugins/bootsplash/init-hooks/50-have-layered-fs/bootsplash.sh @@ -0,0 +1 @@ +[ ${no_bootsplash} -eq 0 ] && /bin/splashy_update "progress 50" >/dev/null 2>&1 diff --git a/src/os-plugins/plugins/bootsplash/init-hooks/60-have-servconfig/bootsplash.sh b/src/os-plugins/plugins/bootsplash/init-hooks/60-have-servconfig/bootsplash.sh new file mode 100644 index 00000000..9c3bd20f --- /dev/null +++ b/src/os-plugins/plugins/bootsplash/init-hooks/60-have-servconfig/bootsplash.sh @@ -0,0 +1 @@ +[ ${no_bootsplash} -eq 0 ] && /bin/splashy_update "progress 60" >/dev/null 2>&1 diff --git a/src/os-plugins/plugins/bootsplash/init-hooks/70-before-plugins/bootsplash.sh b/src/os-plugins/plugins/bootsplash/init-hooks/70-before-plugins/bootsplash.sh new file mode 100644 index 00000000..fcd0c410 --- /dev/null +++ b/src/os-plugins/plugins/bootsplash/init-hooks/70-before-plugins/bootsplash.sh @@ -0,0 +1 @@ +[ ${no_bootsplash} -eq 0 ] && /bin/splashy_update "progress 70" >/dev/null 2>&1 diff --git a/src/os-plugins/plugins/bootsplash/init-hooks/80-after-plugins/bootsplash.sh b/src/os-plugins/plugins/bootsplash/init-hooks/80-after-plugins/bootsplash.sh new file mode 100644 index 00000000..0abfa5b2 --- /dev/null +++ b/src/os-plugins/plugins/bootsplash/init-hooks/80-after-plugins/bootsplash.sh @@ -0,0 +1 @@ +[ ${no_bootsplash} -eq 0 ] && /bin/splashy_update "progress 80" >/dev/null 2>&1 diff --git a/src/os-plugins/plugins/bootsplash/init-hooks/85-have-initial-boot/bootsplash.sh b/src/os-plugins/plugins/bootsplash/init-hooks/85-have-initial-boot/bootsplash.sh new file mode 100644 index 00000000..8738e454 --- /dev/null +++ b/src/os-plugins/plugins/bootsplash/init-hooks/85-have-initial-boot/bootsplash.sh @@ -0,0 +1 @@ +[ ${no_bootsplash} -eq 0 ] && /bin/splashy_update "progress 85" >/dev/null 2>&1 diff --git a/src/os-plugins/plugins/bootsplash/init-hooks/90-postinit-done/bootsplash.sh b/src/os-plugins/plugins/bootsplash/init-hooks/90-postinit-done/bootsplash.sh new file mode 100644 index 00000000..2546d298 --- /dev/null +++ b/src/os-plugins/plugins/bootsplash/init-hooks/90-postinit-done/bootsplash.sh @@ -0,0 +1 @@ +[ ${no_bootsplash} -eq 0 ] && /bin/splashy_update "progress 90" >/dev/null 2>&1 diff --git a/src/os-plugins/plugins/bootsplash/init-hooks/95-cleanup/bootsplash.sh b/src/os-plugins/plugins/bootsplash/init-hooks/95-cleanup/bootsplash.sh new file mode 100644 index 00000000..5ff86715 --- /dev/null +++ b/src/os-plugins/plugins/bootsplash/init-hooks/95-cleanup/bootsplash.sh @@ -0,0 +1 @@ +[ ${no_bootsplash} -eq 0 ] && /bin/splashy_update "progress 95" >/dev/null 2>&1 diff --git a/src/os-plugins/plugins/bootsplash/init-hooks/99-handing-over/bootsplash.sh b/src/os-plugins/plugins/bootsplash/init-hooks/99-handing-over/bootsplash.sh new file mode 100644 index 00000000..93673915 --- /dev/null +++ b/src/os-plugins/plugins/bootsplash/init-hooks/99-handing-over/bootsplash.sh @@ -0,0 +1 @@ +[ ${no_bootsplash} -eq 0 ] && /bin/splashy_update "progress 100" >/dev/null 2>&1 diff --git a/src/os-plugins/plugins/desktop/OpenSLX/Distro/Base.pm b/src/os-plugins/plugins/desktop/OpenSLX/Distro/Base.pm new file mode 100644 index 00000000..316448bb --- /dev/null +++ b/src/os-plugins/plugins/desktop/OpenSLX/Distro/Base.pm @@ -0,0 +1,432 @@ +# Copyright (c) 2008 - 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/Base.pm +# - provides base implementation of the Distro API for the desktop plugin. +# ----------------------------------------------------------------------------- +package desktop::OpenSLX::Distro::Base; + +use strict; +use warnings; + +our $VERSION = 1.01; # API-version . implementation-version + +use File::Basename; +use Scalar::Util qw( weaken ); + +use OpenSLX::Basics; +use OpenSLX::Utils; + +################################################################################ +### interface methods +################################################################################ +sub new +{ + my $class = shift; + my $self = {}; + return bless $self, $class; +} + +sub initialize +{ + my $self = shift; + $self->{engine} = shift; + weaken($self->{'engine'}); + # avoid circular reference between distro and its engine + + return 1; +} + +sub getDefaultDesktopManager +{ + my $self = shift; + + # the default implementation prefers KDM over GDM over XDM + return $self->isKDMInstalled() ? 'kdm' + : $self->isGDMInstalled() ? 'gdm' + : $self->isXDMInstalled() ? 'xdm' : undef; +} + +sub getDefaultDesktopKind +{ + my $self = shift; + + # the default implementation prefers GNOME over KDE over XFCE + return $self->isGNOMEInstalled() ? 'gnome' + : $self->isKDEInstalled() ? 'kde' + : $self->isXFCEInstalled() ? 'xfce' : undef; +} + +sub isGNOMEInstalled +{ + my $self = shift; + + return isInPath('gnome-session'); +} + +sub installGNOME +{ + my $self = shift; + + $self->{engine}->installPackages( + $self->{engine}->getInstallablePackagesForSelection('gnome') + ); + + return 1; +} + +sub isGDMInstalled +{ + my $self = shift; + + return isInPath('gdm'); +} + +sub installGDM +{ + my $self = shift; + + $self->{engine}->installPackages('gdm'); + + return 1; +} + +sub GDMPathInfo +{ + my $self = shift; + + my $pathInfo = { + config => '/etc/gdm/gdm.conf', + paths => [ + '/var/lib/gdm', + '/var/log/gdm', + ], + }; + + return $pathInfo; +} + +sub setupGDMScript +{ + my $self = shift; + my $repoPath = shift; + + my $pathInfo = $self->GDMPathInfo(); + my $configFile = $pathInfo->{config}; + + my $paths + = join( + ' ', + map { '/mnt' . $_ } ( dirname($configFile), @{$pathInfo->{paths}} ) + ); + my $script = unshiftHereDoc(<<" End-of-Here"); + # written by OpenSLX-plugin 'desktop' + + for i in $paths; do + testmkd \$i + done + + cp /mnt$repoPath/gdm/\$desktop_mode/gdm.conf /mnt$configFile + + # activate theme only if the corresponding xml file is found + # (otherwise fall back to default theme of vendor-OS) + if [ -n "\$desktop_theme" ]; then + thdir=/opt/openslx/plugin-repo/desktop/themes/gdm + theme=\$desktop_theme + if [ -e /mnt\$thdir/\$theme/*.xml ]; then + sed -i "s,\\[greeter\\],[greeter]\\nGraphicalThemedColor=," \\ + /mnt$configFile + sed -i "s,\\[greeter\\],[greeter]\\nGraphicalThemeDir=\$thdir," \\ + /mnt$configFile + sed -i "s,\\[greeter\\],[greeter]\\nGraphicalTheme=\$theme," \\ + /mnt$configFile + fi + fi + case "\${desktop_allowshutdown}" in + none) + ;; + root) + sed "s|AllowShutdown.*|AllowShutdown=true|;\\ + s|SecureShutdown.*|SecureShutdown=true|" \\ + -i /mnt$configFile + ;; + users) + sed "s|AllowShutdown.*|AllowShutdown=true|;\\ + s|SecureShutdown.*|SecureShutdown=false|" \\ + -i /mnt$configFile + ;; + esac + [ "\${desktop_rootlogin}" -ne 0 ] && \\ + sed "s|AllowRoot.*|AllowRoot=true|" -i /mnt$configFile + End-of-Here + + return $script; +} + +sub GDMConfigHashForWorkstation +{ + my $self = shift; + + return { + 'chooser' => { + }, + 'daemon' => { + AutomaticLoginEnable => 'false', + Group => 'gdm', + User => 'gdm', + DefaultSession => 'default.desktop', + }, + 'debug' => { + Enable => 'false', + }, + 'greeter' => { + AllowShutdown => 'false', + Browser => 'false', + MinimalUID => '500', + SecureShutdown => 'false', + ShowDomain => 'false', + DefaultWelcome => 'false', + Welcome => 'OpenSLX Workstation (%n)', + }, + 'gui' => { + }, + 'security' => { + AllowRoot => 'false', + AllowRemoteRoot => 'false', + DisallowTCP => 'true', + SupportAutomount => 'true', + }, + 'server' => { + }, + 'xdmcp' => { + Enable => 'false', + }, + }; +} + +sub GDMConfigHashForKiosk +{ + my $self = shift; + + my $configHash = $self->GDMConfigHashForWorkstation(); + $configHash->{daemon}->{AutomaticLoginEnable} = 'true'; + $configHash->{daemon}->{AutomaticLogin} = 'nobody'; + + return $configHash; +} + +sub GDMConfigHashForChooser +{ + my $self = shift; + + my $configHash = $self->GDMConfigHashForWorkstation(); + $configHash->{xdmcp}->{Enable} = 'true'; + + return $configHash; +} + +sub isKDEInstalled +{ + my $self = shift; + + return isInPath('startkde'); +} + +sub installKDE +{ + my $self = shift; + + $self->{engine}->installPackages( + $self->{engine}->getInstallablePackagesForSelection('kde') + ); + + return 1; +} + +sub isKDMInstalled +{ + my $self = shift; + + return isInPath('kdm'); +} + +sub installKDM +{ + my $self = shift; + + $self->{engine}->installPackages('kdm'); + + return 1; +} + +sub KDMPathInfo +{ + my $self = shift; + + my $pathInfo = { + config => '/etc/opt/kdm/kdmrc', + paths => [ + '/var/lib/kdm', + ], + }; + + return $pathInfo; +} + +sub setupKDMScript +{ + my $self = shift; + my $repoPath = shift; + + my $pathInfo = $self->KDMPathInfo(); + my $configFile = $pathInfo->{config}; + + my $paths + = join( + ' ', + map { '/mnt' . $_ } ( dirname($configFile), @{$pathInfo->{paths}} ) + ); + my $script = unshiftHereDoc(<<" End-of-Here"); + #!/bin/sh + # written by OpenSLX-plugin 'desktop' + + for i in $paths; do + testmkd \$i + done + + cp /mnt$repoPath/kdm/\$desktop_mode/kdmrc /mnt$configFile + + # activate theme only if the corresponding xml file is found + # (otherwise fall back to default theme of vendor-OS) + if [ -n "\$desktop_theme" ]; then + theme=\$desktop_theme + thdir=/opt/openslx/plugin-repo/desktop/themes/kdm/\$theme + if [ -e /mnt\$thdir/*.xml ]; then + sed -i "s,\\[X-\\*-Greeter\\],[X-*-Greeter]\\nUseBackground=false," \\ + /mnt$configFile + sed -i "s,\\[X-\\*-Greeter\\],[X-*-Greeter]\\nTheme=\$thdir," \\ + /mnt$configFile + sed -i "s,\\[X-\\*-Greeter\\],[X-*-Greeter]\\nUseTheme=true," \\ + /mnt$configFile + fi + fi + case "\${desktop_allowshutdown}" in + none) + sed "s|AllowShutdown.*|AllowShutdown=None|" \\ + -i /mnt$configFile + ;; + root) + sed "s|AllowShutdown.*|AllowShutdown=Root|" \\ + -i /mnt$configFile + ;; + users) + sed "s|AllowShutdown.*|AllowShutdown=All|" \\ + -i /mnt$configFile + ;; + esac + [ "\${desktop_rootlogin}" -ne 0 ] && \\ + sed "s|AllowRootLogin.*|AllowRootLogin=true|" -i /mnt$configFile + End-of-Here + + return $script; +} + +sub KDMConfigHashForWorkstation +{ + my $self = shift; + + return { +# 'General' => { +# StaticServers => ':0', +# ReserveServers => ':1,:2,:3', +# ServerVTs => '-7', +# ConsoleTTYs => 'tty1,tty2,tty3,tty4,tty5,tty6', +# }, + 'X-:0-Core' => { + AutoLoginEnable => 'false', + AllowRootLogin => 'false', + AllowShutdown => 'All', + }, + 'X-*-Greeter' => { + GreetString => 'OpenSLX Workstation (%h)', + SelectedUsers => '', + UserList => 'false', + }, + 'X-:*-Greeter' => { + AllowClose => 'false', + UseAdminSession => 'true', + }, + 'X-:0-Greeter' => { + LogSource => '/dev/xconsole', + UseAdminSession => 'false', + PreselectUser => 'None', + }, + 'xdmcp' => { + Enable => 'false', + }, + }; +} + +sub KDMConfigHashForKiosk +{ + my $self = shift; + + my $configHash = $self->KDMConfigHashForWorkstation(); + $configHash->{'X-:0-Core'}->{AutoLoginEnable} = 'true'; + $configHash->{'X-:0-Core'}->{AutoLoginUser} = 'nobody'; + + return $configHash; +} + +sub KDMConfigHashForChooser +{ + my $self = shift; + + my $configHash = $self->KDMConfigHashForWorkstation(); + $configHash->{xdmcp}->{Enable} = 'true'; + + return $configHash; +} + +sub isXFCEInstalled +{ + my $self = shift; + + return isInPath('startxfce4'); +} + +sub installXFCE +{ + my $self = shift; + + $self->{engine}->installPackages( + $self->{engine}->getInstallablePackagesForSelection('xfce') + ); + + return 1; +} + +sub isXDMInstalled +{ + my $self = shift; + + return isInPath('xdm'); +} + +sub installXDM +{ + my $self = shift; + + $self->{engine}->installPackages('xdm'); + + return 1; +} + +1; diff --git a/src/os-plugins/plugins/desktop/OpenSLX/Distro/Debian.pm b/src/os-plugins/plugins/desktop/OpenSLX/Distro/Debian.pm new file mode 100644 index 00000000..c212b3ef --- /dev/null +++ b/src/os-plugins/plugins/desktop/OpenSLX/Distro/Debian.pm @@ -0,0 +1,63 @@ +# Copyright (c) 2006..2009 - 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/Debian.pm +# - provides Debian-specific overrides of the Distro API for the desktop +# plugin. +# ----------------------------------------------------------------------------- +package desktop::OpenSLX::Distro::Debian; + +use strict; +use warnings; + +use base qw(desktop::OpenSLX::Distro::Base); + +use OpenSLX::Basics; +use OpenSLX::Utils; + +################################################################################ +### interface methods +################################################################################ + +sub setupGDMScript +{ + my $self = shift; + my $repoPath = shift; + + my $script = $self->SUPER::setupGDMScript($repoPath); + + $script .= unshiftHereDoc(<<' End-of-Here'); + rllinker gdm 1 1 + echo '/usr/bin/gdm' > /mnt/etc/X11/default-display-manager + # 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 + End-of-Here + + return $script; +} + +sub setupKDMScript +{ + my $self = shift; + my $repoPath = shift; + + my $script = $self->SUPER::setupKDMScript($repoPath); + + $script .= unshiftHereDoc(<<' End-of-Here'); + rllinker kdm 1 1 + echo '/usr/bin/kdm' > /mnt/etc/X11/default-display-manager + End-of-Here + + return $script; +} + +1; diff --git a/src/os-plugins/plugins/desktop/OpenSLX/Distro/Fedora.pm b/src/os-plugins/plugins/desktop/OpenSLX/Distro/Fedora.pm new file mode 100644 index 00000000..f9428aab --- /dev/null +++ b/src/os-plugins/plugins/desktop/OpenSLX/Distro/Fedora.pm @@ -0,0 +1,30 @@ +# Copyright (c) 2006, 2007 - 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/Fedora.pm +# - provides Fedora-specific overrides of the Distro API for the desktop +# plugin. +# ----------------------------------------------------------------------------- +package desktop::OpenSLX::Distro::Fedora; + +use strict; +use warnings; + +use base qw(desktop::OpenSLX::Distro::Base); + +use OpenSLX::Basics; + +################################################################################ +### interface methods +################################################################################ + +# TODO: implement! + +1; \ No newline at end of file diff --git a/src/os-plugins/plugins/desktop/OpenSLX/Distro/Gentoo.pm b/src/os-plugins/plugins/desktop/OpenSLX/Distro/Gentoo.pm new file mode 100644 index 00000000..129f4d08 --- /dev/null +++ b/src/os-plugins/plugins/desktop/OpenSLX/Distro/Gentoo.pm @@ -0,0 +1,30 @@ +# Copyright (c) 2006, 2007 - 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/Gentoo.pm +# - provides Gentoo-specific overrides of the Distro API for the desktop +# plugin. +# ----------------------------------------------------------------------------- +package desktop::OpenSLX::Distro::Gentoo; + +use strict; +use warnings; + +use base qw(desktop::OpenSLX::Distro::Base); + +use OpenSLX::Basics; + +################################################################################ +### interface methods +################################################################################ + +# TODO: implement! + +1; diff --git a/src/os-plugins/plugins/desktop/OpenSLX/Distro/Scilin.pm b/src/os-plugins/plugins/desktop/OpenSLX/Distro/Scilin.pm new file mode 100644 index 00000000..1dc0482c --- /dev/null +++ b/src/os-plugins/plugins/desktop/OpenSLX/Distro/Scilin.pm @@ -0,0 +1,132 @@ +# Copyright (c) 2006..2009 - 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/Scilin.pm +# - provides Scilin-specific overrides of the Distro API for the desktop +# plugin. +# ----------------------------------------------------------------------------- +package desktop::OpenSLX::Distro::Scilin; + +use strict; +use warnings; + +use base qw(desktop::OpenSLX::Distro::Base); + +use File::Path; + +use OpenSLX::Basics; +use OpenSLX::Utils; + +################################################################################ +### interface methods +################################################################################ + +sub GDMPathInfo +{ + my $self = shift; + + my $pathInfo = $self->SUPER::GDMPathInfo(); + + # create 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}; + + # include common stuff (independent of display manager used) + $script = _setupCommonDmScript($script); + + $script .= unshiftHereDoc(<<' End-of-Here'); + echo "DISPLAYMANAGER=GNOME" \ + >/mnt/etc/sysconfig/desktop + # gdm does not like AUFS/UnionFS on its var directory + mkdir -m 1770 /mnt/var/lib/gdm + chown root:gdm /mnt/var/lib/gdm + End-of-Here + + return $script; +} + +sub GDMConfigHashForWorkstation +{ + my $self = shift; + + my $configHash = $self->SUPER::GDMConfigHashForWorkstation(); + $configHash->{'daemon'}->{SessionDesktopDir} = + '/etc/X11/session/:/usr/share/xsessions/:/usr/share/gdm/BuiltInSessions'; + $configHash->{'daemon'}->{Greeter} = + '/usr/libexec/gdmgreeter'; + + return $configHash; +} + +sub setupKDMScript +{ + my $self = shift; + my $repoPath = shift; + + # SUSE reads /var/adm/kdm/kdmrc.sysconfig, so we link that to + # our config file + my $pathInfo = $self->KDMPathInfo(); + my $configFile = $pathInfo->{config}; + mkpath("/etc/opt/kdm"); + mkpath("/var/adm/kdm"); + # maybe backup kdmrc.sysconfig sometimes + unlink("/var/adm/kdm/kdmrc.sysconfig"); + # the config file gets overwritten if this script is present + unlink("/opt/kde3/share/apps/kdm/read_sysconfig.sh"); + symlink("/etc/opt/kdm/kdmrc", "/var/adm/kdm/kdmrc.sysconfig"); + + my $script = $self->SUPER::setupKDMScript($repoPath); + + # include common stuff (independent of display manager used) + $script = _setupCommonDmScript($script); + + $script .= unshiftHereDoc(<<' End-of-Here'); + echo "DISPLAYMANAGER=KDE" \ + >/mnt/etc/sysconfig/desktop + End-of-Here + + return $script; +} + +sub _setupCommonDmScript +{ + my $script = shift; + + $script .= unshiftHereDoc(<<' End-of-Here'); + # cleanup after users Xorg session + sed 's,^#!.*,,' /mnt/etc/X11/xdm/Xreset \ + > /mnt/etc/X11/xdm/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 ) & + . /etc/X11/xdm/Xreset.system' >/mnt/etc/X11/xdm/Xreset + chmod a+x /mnt/etc/X11/xdm/Xreset* + + # enable the inittab entry again (incomplete) + # sed -e "s,# line deleted.*,x:5:respawn:/etc/X11/prefdm -nodaemon," \ + # -i /mnt/etc/inittab + End-of-Here + + return $script; +} + +1; diff --git a/src/os-plugins/plugins/desktop/OpenSLX/Distro/Suse.pm b/src/os-plugins/plugins/desktop/OpenSLX/Distro/Suse.pm new file mode 100644 index 00000000..433ed7e1 --- /dev/null +++ b/src/os-plugins/plugins/desktop/OpenSLX/Distro/Suse.pm @@ -0,0 +1,162 @@ +# 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/Suse.pm +# - provides SUSE-specific overrides of the Distro API for the desktop +# plugin. +# ----------------------------------------------------------------------------- +package desktop::OpenSLX::Distro::Suse; + +use strict; +use warnings; + +use base qw(desktop::OpenSLX::Distro::Base); + +use File::Path; + +use OpenSLX::Basics; +use OpenSLX::Utils; + +################################################################################ +### interface methods +################################################################################ + +sub GDMPathInfo +{ + my $self = shift; + + my $pathInfo = $self->SUPER::GDMPathInfo(); + + # create 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}; + + # include common stuff (independent of display manager used) + $script = _setupCommonDmScript($script); + + $script .= unshiftHereDoc(<<' End-of-Here'); + echo -e '# changed by $0 during stage3 setup\nDISPLAYMANAGER="gdm"' \ + >/mnt/etc/sysconfig/displaymanager + sed -i "s/DEFAULT_WM=.*/DEFAULT_WM=\"$desktop_kind\"/" \ + /mnt/etc/sysconfig/windowmanager + #sed "s|XSESSION|/etc/xdm/Xsession|" -i /mnt$configFile + # 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 + # no use for this configuration info file + rm /mnt/etc/gdm/gdm_sysconfig.* 2>/dev/null + End-of-Here + + return $script; +} + +sub GDMConfigHashForWorkstation +{ + my $self = shift; + + my $configHash = $self->SUPER::GDMConfigHashForWorkstation(); + $configHash->{'daemon'}->{SessionDesktopDir} = + '/etc/X11/session/:/usr/share/xsessions/'; + $configHash->{'daemon'}->{DefaultSession} = 'default.desktop'; + $configHash->{'daemon'}->{Greeter} = + '/usr/lib/gdm/gdmgreeter'; + + return $configHash; +} + +sub setupKDMScript +{ + my $self = shift; + my $repoPath = shift; + + # check for kdm version + my $kdmVer; + my $kdmPath; + if (-e "/usr/bin/kdm") { + $kdmVer = "4"; + $kdmPath = "/usr/share/kde4"; + } + else { + $kdmVer = ""; + $kdmPath = "/opt/kde3/share"; + # change default theme to openslx-legacy if kdm3 + print " * Please change to openslx-legacy theme when using kdm3\n"; + } + + # SUSE reads /var/adm/kdm/kdmrc.sysconfig, so we link that to + # our config file + my $pathInfo = $self->KDMPathInfo(); + my $configFile = $pathInfo->{config}; + mkpath("/etc/opt/kdm"); + mkpath("/var/adm/kdm"); + # maybe backup kdmrc.sysconfig sometimes + unlink("/var/adm/kdm/kdmrc.sysconfig"); + # the config file gets overwritten if this script is present + unlink("$kdmPath/apps/kdm/read_sysconfig.sh"); + symlink("/etc/opt/kdm/kdmrc", "/var/adm/kdm/kdmrc.sysconfig"); + + my $script = $self->SUPER::setupKDMScript($repoPath); + + # include common stuff (independent of display manager used) + $script = _setupCommonDmScript($script); + + $script .= "kdmver=$kdmVer\n"; + $script .= unshiftHereDoc(<<' End-of-Here'); + sed -i "s/DISPLAYMANAGER=.*/DISPLAYMANAGER=\"kdm$kdmver\"/" \ + /mnt/etc/sysconfig/displaymanager + [ $(grep -q DISPLAYMANAGER /mnt/etc/sysconfig/displaymanager) ] && \ + echo "DISPLAYMANAGER=\"kdm$kdmver\"" >>/mnt/etc/sysconfig/displaymanager + sed -i "s/DEFAULT_WM=.*/DEFAULT_WM=\"$desktop_kind\"/" \ + /mnt/etc/sysconfig/windowmanager + # needed for compatibility X11/session(s) + ln -s /etc/X11/session /mnt/etc/X11/sessions + End-of-Here + + return $script; +} + +sub _setupCommonDmScript +{ + my $script = shift; + + $script .= unshiftHereDoc(<<' End-of-Here'); + rllinker xdm 1 10 + # cleanup after users Xorg session + sed 's,^#!.*,,' /mnt/etc/X11/xdm/Xreset \ + > /mnt/etc/X11/xdm/Xreset.system + echo -e '#!/bin/sh\n#\n# modified by desktop plugin in Stage3\n#\n + # avoid annoying messages on removed sound devices + ( su -c "rm ~/.kde4/share/config/phonondevicesrc" - $USER ) & + + # 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/X11/xdm/Xreset.system' >/mnt/etc/X11/xdm/Xreset + chmod a+x /mnt/etc/X11/xdm/Xreset* + + End-of-Here + + return $script; +} + +1; diff --git a/src/os-plugins/plugins/desktop/OpenSLX/Distro/Suse_10_2.pm b/src/os-plugins/plugins/desktop/OpenSLX/Distro/Suse_10_2.pm new file mode 100644 index 00000000..ac14b2a5 --- /dev/null +++ b/src/os-plugins/plugins/desktop/OpenSLX/Distro/Suse_10_2.pm @@ -0,0 +1,54 @@ +# 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/Suse_10_2.pm +# - provides SUSE-10.2-specific overrides of the Distro API for the desktop +# plugin. +# ----------------------------------------------------------------------------- +package desktop::OpenSLX::Distro::Suse_10_2; + +use strict; +use warnings; + +use base qw(desktop::OpenSLX::Distro::Suse); + +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/opt/gnome/gdm/custom.conf'; + + return $pathInfo; +} + +sub GDMConfigHashForWorkstation +{ + my $self = shift; + + my $configHash = $self->SUPER::GDMConfigHashForWorkstation(); + $configHash->{'daemon'}->{SessionDesktopDir} = + '/etc/X11/session/:/usr/share/xsessions/'; + $configHash->{'daemon'}->{Greeter} = + '/opt/gnome/lib/gdm/gdmgreeter'; + + return $configHash; +} + +1; diff --git a/src/os-plugins/plugins/desktop/OpenSLX/Distro/Ubuntu.pm b/src/os-plugins/plugins/desktop/OpenSLX/Distro/Ubuntu.pm new file mode 100644 index 00000000..d222c102 --- /dev/null +++ b/src/os-plugins/plugins/desktop/OpenSLX/Distro/Ubuntu.pm @@ -0,0 +1,169 @@ +# 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; diff --git a/src/os-plugins/plugins/desktop/OpenSLX/Distro/Ubuntu_8.pm b/src/os-plugins/plugins/desktop/OpenSLX/Distro/Ubuntu_8.pm new file mode 100644 index 00000000..6f00f181 --- /dev/null +++ b/src/os-plugins/plugins/desktop/OpenSLX/Distro/Ubuntu_8.pm @@ -0,0 +1,161 @@ +# 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_8.pm +# - provides Ubuntu-specific overrides of the distro API for the desktop +# plugin. +# ----------------------------------------------------------------------------- +package desktop::OpenSLX::Distro::Ubuntu_8; + +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/gdm.conf-custom'; + + 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 after dbus/hal + rllinker gdm 5 10 + echo '/usr/sbin/gdm' >/mnt/etc/X11/default-display-manager + 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(); + my $kdmVer = "3"; + + $pathInfo = { + config => "/etc/kde$kdmVer/kdm/kdmrc", + paths => [ + '/var/lib/kdm', + '/var/run/kdm', + ], + }; + + return $pathInfo; +} + +sub GDMConfigHashForWorkstation +{ + my $self = shift; + + my $configHash = $self->SUPER::GDMConfigHashForWorkstation(); + $configHash->{'daemon'}->{SessionDesktopDir} = + '/etc/X11/session/:/usr/share/xsessions/:/usr/share/gdm/BuiltInSessions/'; + + return $configHash; +} + +sub KDMConfigHashForWorkstation +{ + my $self = shift; + + my $kdmVer = "4"; + my $configHash = $self->SUPER::KDMConfigHashForWorkstation(); + $configHash->{'General'}->{PidFile} = "/var/run/kdm.pid"; + $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); + + # change default theme to openslx-legacy if kdm3 + if ( $kdmVer == "3" ) { + print " * Please change to openslx-legacy theme when using kdm3\n"; + } + + $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* + + rllinker kdm 1 10 + 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; diff --git a/src/os-plugins/plugins/desktop/OpenSLX/Distro/Ubuntu_9_04.pm b/src/os-plugins/plugins/desktop/OpenSLX/Distro/Ubuntu_9_04.pm new file mode 100644 index 00000000..1022d6e8 --- /dev/null +++ b/src/os-plugins/plugins/desktop/OpenSLX/Distro/Ubuntu_9_04.pm @@ -0,0 +1,161 @@ +# 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_9_04.pm +# - provides Ubuntu-specific overrides of the distro API for the desktop +# plugin. +# ----------------------------------------------------------------------------- +package desktop::OpenSLX::Distro::Ubuntu_9_04; + +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/gdm.conf-custom'; + + 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 after dbus/hal + rllinker gdm 5 10 + echo '/usr/sbin/gdm' >/mnt/etc/X11/default-display-manager + 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(); + my $kdmVer = "4"; + + $pathInfo = { + config => "/etc/kde$kdmVer/kdm/kdmrc", + paths => [ + '/var/lib/kdm', + '/var/run/kdm', + ], + }; + + return $pathInfo; +} + +sub GDMConfigHashForWorkstation +{ + my $self = shift; + + my $configHash = $self->SUPER::GDMConfigHashForWorkstation(); + $configHash->{'daemon'}->{SessionDesktopDir} = + '/etc/X11/session/:/usr/share/xsessions/:/usr/share/gdm/BuiltInSessions/'; + + return $configHash; +} + +sub KDMConfigHashForWorkstation +{ + my $self = shift; + + my $kdmVer = "4"; + my $configHash = $self->SUPER::KDMConfigHashForWorkstation(); + $configHash->{'General'}->{PidFile} = "/var/run/kdm.pid"; + $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); + + # change default theme to openslx-legacy if kdm3 + if ( $kdmVer == "3" ) { + print " * Please change to openslx-legacy theme when using kdm3\n"; + } + + $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* + + rllinker kdm 1 10 + 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; diff --git a/src/os-plugins/plugins/desktop/OpenSLX/OSPlugin/desktop.pm b/src/os-plugins/plugins/desktop/OpenSLX/OSPlugin/desktop.pm new file mode 100644 index 00000000..7d496483 --- /dev/null +++ b/src/os-plugins/plugins/desktop/OpenSLX/OSPlugin/desktop.pm @@ -0,0 +1,712 @@ +# Copyright (c) 2008..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.pm +# - implementation of the 'desktop' plugin, which installs +# all needed information for a displaymanager and for the desktop. +# ----------------------------------------------------------------------------- +package OpenSLX::OSPlugin::desktop; + +use strict; +use warnings; + +use base qw(OpenSLX::OSPlugin::Base); + +use File::Basename; +use File::Path; + +use OpenSLX::Basics; +use OpenSLX::Utils; + +sub new +{ + my $class = shift; + + my $self = { + name => 'desktop', + }; + + my $localGDMThemesDir + = "$openslxConfig{'config-path'}/plugins/desktop/themes/gdm"; + mkpath($localGDMThemesDir) unless -e $localGDMThemesDir; + my $localKDMThemesDir + = "$openslxConfig{'config-path'}/plugins/desktop/themes/kdm"; + mkpath($localKDMThemesDir) unless -e $localKDMThemesDir; + + return bless $self, $class; +} + +sub getInfo +{ + my $self = shift; + + return { + description => unshiftHereDoc(<<' End-of-Here'), + Sets a desktop and creates needed configs, theme can be set as well. + End-of-Here + precedence => 40, + # not really required e.g. for modern autoconfiguring systems like Ubuntu + # 10.04 + # required => [ qw( xserver ) ], + }; +} + +sub getAttrInfo +{ + my $self = shift; + + return { + # stage3 + 'desktop::active' => { + applies_to_systems => 1, + applies_to_clients => 1, + description => unshiftHereDoc(<<' End-of-Here'), + should the 'desktop'-plugin be executed during boot? + End-of-Here + content_regex => qr{^(0|1)$}, + content_descr => '1 means active - 0 means inactive', + default => '1', + }, + 'desktop::kind' => { + applies_to_systems => 1, + applies_to_clients => 1, + description => unshiftHereDoc(<<' End-of-Here'), + which desktop environment shall be used: gnome, kde, or xfce? + End-of-Here + content_regex => qr{^(gnome|kde|xfce)$}, + content_descr => '"gnome", "kde" or "xfce"', + default => undef, + }, + 'desktop::manager' => { + applies_to_systems => 1, + applies_to_clients => 1, + description => unshiftHereDoc(<<' End-of-Here'), + which display manager to start: gdm, kdm or xdm? + End-of-Here + content_regex => qr{^(gdm|kdm|xdm)$}, + content_descr => '"gdm", "kdm" or "xdm"', + default => undef, + }, + 'desktop::mode' => { + applies_to_systems => 1, + applies_to_clients => 1, + description => unshiftHereDoc(<<' End-of-Here'), + which type of operation mode shall be activated: + workstattion, kiosk or chooser? + End-of-Here + content_regex => qr{^(workstation|kiosk|chooser)$}, + content_descr => '"workstation", "kiosk" or "chooser"', + default => 'workstation', + }, + 'desktop::theme' => { + applies_to_systems => 1, + applies_to_clients => 1, + description => unshiftHereDoc(<<' End-of-Here'), + name of the theme to apply to the desktop (unset for no theme) + End-of-Here + content_descr => 'one of the entries in "supported_themes"', + default => 'openslx', + }, + 'desktop::allowshutdown' => { + applies_to_systems => 1, + applies_to_clients => 1, + description => unshiftHereDoc(<<' End-of-Here'), + allow shutdown of the SLX client via gdm/kdm. "none" disables + this functionality, "root" allows only the sysadmin and + "users" means free4all. + End-of-Here + content_regex => qr{^(none|root|users)$}, + content_descr => 'possible entries "none", "root" or "users"', + default => 'users', + }, + 'desktop::rootlogin' => { + applies_to_systems => 1, + applies_to_clients => 1, + description => unshiftHereDoc(<<' End-of-Here'), + allow the system administrator to logon to the graphical + user interface (1 allow, 0 disallow). + End-of-Here + content_descr => '1 means allowed - 0 means forbidden', + content_regex => qr{^(0|1)$}, + default => '1', + }, + # kiosk mode just has the option to logon user nobody + #'desktop::auto-login' => { + # applies_to_systems => 1, + # applies_to_clients => 1, + # description => unshiftHereDoc(<<' End-of-Here'), + # set an arbitrary user which is logged in automatically into + # the graphical user interface (none disables, default). + # End-of-Here + # content_descr => 'none disables - logins in that userid', + # default => 'none', + #}, + + # stage1 + 'desktop::gdm' => { + applies_to_vendor_os => 1, + description => unshiftHereDoc(<<' End-of-Here'), + should gdm be available (installed in vendor-OS)? + End-of-Here + content_regex => qr{^0|1$}, + content_descr => '"0", "1" or "-" (for unset)', + default => undef, + }, + 'desktop::gnome' => { + applies_to_vendor_os => 1, + description => unshiftHereDoc(<<' End-of-Here'), + should gnome be available (installed in vendor-OS)? + End-of-Here + content_regex => qr{^0|1$}, + content_descr => '"0", "1" or "-" (for unset)', + default => undef, + }, + 'desktop::kde' => { + applies_to_vendor_os => 1, + description => unshiftHereDoc(<<' End-of-Here'), + should kde be available (installed in vendor-OS)? + End-of-Here + content_regex => qr{^0|1$}, + content_descr => '"0", "1" or "-" (for unset)', + default => undef, + }, + 'desktop::kdm' => { + applies_to_vendor_os => 1, + description => unshiftHereDoc(<<' End-of-Here'), + should kdm be available (installed in vendor-OS)? + End-of-Here + content_regex => qr{^0|1$}, + content_descr => '"0", "1" or "-" (for unset)', + default => undef, + }, + 'desktop::supported_themes' => { + applies_to_vendor_os => 1, + description => unshiftHereDoc(<<' End-of-Here'), + name of all themes that shall be installed in vendor-OS (such + that they can be selected via 'desktop::theme' in stage 3). + End-of-Here + content_descr => 'a comma-separated list of theme names', + default => undef, + }, + 'desktop::xdm' => { + applies_to_vendor_os => 1, + description => unshiftHereDoc(<<' End-of-Here'), + should xdm be available (installed in vendor-OS)? + End-of-Here + content_regex => qr{^0|1$}, + content_descr => '"0", "1" or "-" (for unset)', + default => undef, + }, + 'desktop::xfce' => { + applies_to_vendor_os => 1, + description => unshiftHereDoc(<<' End-of-Here'), + should xfce be available (installed in vendor-OS)? + End-of-Here + content_regex => qr{^0|1$}, + content_descr => '"0", "1" or "-" (for unset)', + default => undef, + }, + }; +} + +sub getDefaultAttrsForVendorOS +{ + my $self = shift; + my $vendorOSName = shift; + + my $attrs = $self->getAttrInfo(); + + if ($vendorOSName =~ m{kde}) { + $attrs->{'desktop::manager'}->{default} = 'kdm'; + $attrs->{'desktop::kind'}->{default} = 'kde'; + } + elsif ($vendorOSName =~ m{gnome}) { + $attrs->{'desktop::manager'}->{default} = 'gdm'; + $attrs->{'desktop::kind'}->{default} = 'gnome'; + } + elsif ($vendorOSName =~ m{xfce}) { + $attrs->{'desktop::manager'}->{default} = 'xdm'; + $attrs->{'desktop::kind'}->{default} = 'xcfe'; + } + else { + $attrs->{'desktop::manager'}->{default} + = $self->{distro}->getDefaultDesktopManager(); + $attrs->{'desktop::kind'}->{default} + = $self->{distro}->getDefaultDesktopKind(); + } + return $attrs; +} + +sub checkStage3AttrValues +{ + my $self = shift; + my $stage3Attrs = shift; + my $vendorOSAttrs = shift; + + my @problems; + + my $manager = $stage3Attrs->{'desktop::manager'} || ''; + if ($manager eq 'kdm') { + if (!defined $vendorOSAttrs->{'desktop::kdm'} + || $vendorOSAttrs->{'desktop::kdm'} == 1) { + if (!$self->{distro}->isKDMInstalled()) { + push @problems, _tr( + "KDM is not installed in vendor-OS, so using it as desktop manager wouldn't work!" + ); + } + } + elsif ($vendorOSAttrs->{'desktop::kdm'} == 0) { + push @problems, _tr( + "desktop::kdm is 0, so using KDM as desktop manager is not allowed for this vendor-OS!" + ); + } + } + elsif ($manager eq 'gdm') { + if (!defined $vendorOSAttrs->{'desktop::gdm'} + || $vendorOSAttrs->{'desktop::gdm'} == 1) { + if (!$self->{distro}->isGDMInstalled()) { + push @problems, _tr( + "GDM is not installed in vendor-OS, so using it as desktop manager wouldn't work!" + ); + } + } + elsif ($vendorOSAttrs->{'desktop::gdm'} == 0) { + push @problems, _tr( + "desktop::gdm is 0, so using GDM as desktop manager is not allowed for this vendor-OS!" + ); + } + } + elsif ($manager eq 'xdm') { + if (!defined $vendorOSAttrs->{'desktop::xdm'} + || $vendorOSAttrs->{'desktop::xdm'} == 1) { + if (!$self->{distro}->isXDMInstalled()) { + push @problems, _tr( + "XDM is not installed in vendor-OS, so using it as desktop manager wouldn't work!" + ); + } + } + elsif ($vendorOSAttrs->{'desktop::xdm'} == 0) { + push @problems, _tr( + "desktop::xdm is 0, so using XDM as desktop manager is not allowed for this vendor-OS!" + ); + } + } + + my $kind = $stage3Attrs->{'desktop::kind'} || ''; + if ($kind eq 'kde') { + if (!defined $vendorOSAttrs->{'desktop::kde'} + || $vendorOSAttrs->{'desktop::kde'} == 1) { + if (!$self->{distro}->isKDEInstalled()) { + push @problems, _tr( + "KDE is not installed in vendor-OS, so using it as desktop kind wouldn't work!" + ); + } + } + elsif ($vendorOSAttrs->{'desktop::kde'} == 0) { + push @problems, _tr( + "desktop::kde is 0, so using KDE as desktop kind is not allowed for this vendor-OS!" + ); + } + } + elsif ($kind eq 'gnome') { + if (!defined $vendorOSAttrs->{'desktop::gnome'} + || $vendorOSAttrs->{'desktop::gnome'} == 1) { + if (!$self->{distro}->isGNOMEInstalled()) { + push @problems, _tr( + "GNOME is not installed in vendor-OS, so using it as desktop kind wouldn't work!" + ); + } + } + elsif ($vendorOSAttrs->{'desktop::gnome'} == 0) { + push @problems, _tr( + "desktop::gnome is 0, so using GNOME as desktop kind is not allowed for this vendor-OS!" + ); + } + } + elsif ($kind eq 'xfce') { + if (!defined $vendorOSAttrs->{'desktop::xfce'} + || $vendorOSAttrs->{'desktop::xfce'} == 1) { + if (!$self->{distro}->isXFCEInstalled()) { + push @problems, _tr( + "XFCE is not installed in vendor-OS, so using it as desktop kind wouldn't work!" + ); + } + } + elsif ($vendorOSAttrs->{'desktop::xfce'} == 0) { + push @problems, _tr( + "desktop::xfce is 0, so using XFCE as desktop kind is not allowed for this vendor-OS!" + ); + } + } + + my @supportedThemes + = split ',', $vendorOSAttrs->{'desktop::supported_themes'} || ''; + my $theme = $stage3Attrs->{'desktop::theme'}; + if (defined $theme && !grep { $_ eq $theme } @supportedThemes) { + push @problems, _tr( + "desktop::theme '%s' does not refer to a supported theme!\nSupported themes are: %s", + $theme, $vendorOSAttrs->{'desktop::supported_themes'} || '' + ); + } + + return if !@problems; + + return \@problems; +} + +sub installationPhase +{ + my $self = shift; + my $info = shift; + + $self->{pluginRepositoryPath} = $info->{'plugin-repo-path'}; + $self->{pluginTempPath} = $info->{'plugin-temp-path'}; + $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 + # the resulting values, but we want to store the original (undef). + # In order to do so, we copy all stage1 attributes directly into the + # object hash and change them there. + $self->{gdm} = $self->{attrs}->{'desktop::gdm'}; + $self->{kdm} = $self->{attrs}->{'desktop::kdm'}; + $self->{xdm} = $self->{attrs}->{'desktop::xdm'}; + $self->{gnome} = $self->{attrs}->{'desktop::gnome'}; + $self->{kde} = $self->{attrs}->{'desktop::kde'}; + $self->{xcfe} = $self->{attrs}->{'desktop::xfce'}; + $self->{supported_themes} = $self->{attrs}->{'desktop::supported_themes'}; + + $self->_installRequiredPackages(); + $self->_fillUnsetStage1Attrs(); + $self->_ensureSensibleStage3Attrs(); + + # start to actually do something - according to current stage1 attributes + if ($self->{gdm}) { + $self->_setupGDM(); + } + if ($self->{kdm}) { + $self->_setupKDM(); + } + if ($self->{xdm}) { + $self->_setupXDM(); + } + $self->_setupSupportedThemes(); + + return; +} + +sub removalPhase +{ + my $self = shift; + my $info = shift; + + return; +} + +sub copyRequiredFilesIntoInitramfs +{ + my $self = shift; + my $targetPath = shift; + my $attrs = shift; + my $makeInitRamFSEngine = shift; + + my $desktopTheme = $attrs->{'desktop::theme'} || ''; + + vlog(1, _tr("desktop-plugin: desktop=%s", $desktopTheme)); + + return; +} + +sub _installRequiredPackages +{ + my $self = shift; + + my $engine = $self->{'os-plugin-engine'}; + + if ($self->{'gnome'} && !$self->{distro}->isGNOMEInstalled()) { + $self->{distro}->installGNOME(); + } + if ($self->{'gdm'} && !$self->{distro}->isGDMInstalled()) { + $self->{distro}->installGDM(); + } + if ($self->{'kde'} && !$self->{distro}->isKDEInstalled()) { + $self->{distro}->installKDE(); + } + if ($self->{'kdm'} && !$self->{distro}->isKDMInstalled()) { + $self->{distro}->installKDM(); + } + if ($self->{'xfce'} && !$self->{distro}->isXFCEInstalled()) { + $self->{distro}->installXFCE(); + } + if ($self->{'xdm'} && !$self->{distro}->isXDMInstalled()) { + $self->{distro}->installXDM(); + } + + return 1; +} + +sub _fillUnsetStage1Attrs +{ + my $self = shift; + + if (!defined $self->{'gnome'}) { + $self->{'gnome'} = $self->{distro}->isGNOMEInstalled(); + } + if (!defined $self->{'gdm'}) { + $self->{'gdm'} = $self->{distro}->isGDMInstalled(); + } + if (!defined $self->{'kde'}) { + $self->{'kde'} = $self->{distro}->isKDEInstalled(); + } + if (!defined $self->{'kdm'}) { + $self->{'kdm'} = $self->{distro}->isKDMInstalled(); + } + if (!defined $self->{'xfce'}) { + $self->{'xfce'} = $self->{distro}->isXFCEInstalled(); + } + if (!defined $self->{'xdm'}) { + $self->{'xdm'} = $self->{distro}->isXDMInstalled(); + } + if (!defined $self->{'supported_themes'}) { + $self->{attrs}->{'desktop::supported_themes'} + = $self->{'supported_themes'} + = join ",", $self->_getAvailableThemes(); + } + + return 1; +} + +sub _ensureSensibleStage3Attrs +{ + my $self = shift; + + # check if current desktop kind is enabled at all and select another + # one, if it isn't + my $kind = $self->{attrs}->{'desktop::kind'} || ''; + if (!$self->{$kind}) { + my @desktops = map { $self->{$_} ? $_ : () } qw( gnome kde xfce ); + if (!@desktops) { + die _tr( + "no desktop kind is possible, plugin 'desktop' wouldn't work!" + ); + } + vlog(0, _tr("selecting %s as desktop kind\n", $desktops[0])); + $self->{attrs}->{'desktop::kind'} = $desktops[0]; + } + + # check if current desktop manager is enabled at all and select another + # one, if it isn't + my $manager = $self->{attrs}->{'desktop::manager'} || ''; + if (!$self->{$manager}) { + my @managers = map { $self->{$_} ? $_ : () } qw( kdm gdm xdm ); + if (!@managers) { + die _tr( + "no desktop manager is possible, plugin 'desktop' wouldn't work!" + ); + } + vlog(0, _tr("selecting %s as desktop manager\n", $managers[0])); + $self->{attrs}->{'desktop::manager'} = $managers[0]; + } + + # check if current theme is supported at all and select another one, if it + # isn't + my $theme = $self->{attrs}->{'desktop::theme'} || ''; + my @supportedThemes = split ",", $self->{'supported_themes'} || ''; + if (!grep { $_ eq $theme } @supportedThemes) { + if (!@supportedThemes) { + vlog( 0, _tr("no themes are supported, using no theme!")); + $self->{attrs}->{'desktop::theme'} = undef; + } + else { + vlog(0, _tr("selecting %s as theme\n", $supportedThemes[0])); + $self->{attrs}->{'desktop::theme'} = $supportedThemes[0]; + } + } + + return 1; +} + +sub _setupGDM +{ + my $self = shift; + + my $repoPath = $self->{pluginRepositoryPath}; + mkpath([ + "$repoPath/gdm/workstation", + "$repoPath/gdm/kiosk", + "$repoPath/gdm/chooser", + ]); + + $self->_setupGDMScript(); + + my $configHash = $self->{distro}->GDMConfigHashForWorkstation(); + $self->_writeConfigHash($configHash, "$repoPath/gdm/workstation/gdm.conf"); + + $configHash = $self->{distro}->GDMConfigHashForKiosk(); + $self->_writeConfigHash($configHash, "$repoPath/gdm/kiosk/gdm.conf"); + + $configHash = $self->{distro}->GDMConfigHashForChooser(); + $self->_writeConfigHash($configHash, "$repoPath/gdm/chooser/gdm.conf"); + + return; +} + +sub _setupGDMScript +{ + my $self = shift; + + my $repoPath = $self->{pluginRepositoryPath}; + my $script = $self->{distro}->setupGDMScript($repoPath); + + spitFile("$repoPath/gdm/desktop.sh", $script); + + return; +} + +sub _setupKDM +{ + my $self = shift; + + my $repoPath = $self->{pluginRepositoryPath}; + mkpath([ + "$repoPath/kdm/workstation", + "$repoPath/kdm/kiosk", + "$repoPath/kdm/chooser", + ]); + + $self->_setupKDMScript(); + + my $configHash = $self->{distro}->KDMConfigHashForWorkstation(); + $self->_writeConfigHash($configHash, "$repoPath/kdm/workstation/kdmrc"); + + $configHash = $self->{distro}->KDMConfigHashForKiosk(); + $self->_writeConfigHash($configHash, "$repoPath/kdm/kiosk/kdmrc"); + + $configHash = $self->{distro}->KDMConfigHashForChooser(); + $self->_writeConfigHash($configHash, "$repoPath/kdm/chooser/kdmrc"); + + return; +} + +sub _setupKDMScript +{ + my $self = shift; + + my $repoPath = $self->{pluginRepositoryPath}; + my $script = $self->{distro}->setupKDMScript($repoPath); + + spitFile("$repoPath/kdm/desktop.sh", $script); + + return; +} + +sub _setupXDM +{ + my $self = shift; +} + +sub _writeConfigHash +{ + my $self = shift; + my $hash = shift || {}; + my $file = shift; + + my $content = ''; + for my $domain (sort keys %$hash) { + $content .= "[$domain]\n"; + for my $key (sort keys %{$hash->{$domain}}) { + my $value + = defined $hash->{$domain}->{$key} + ? $hash->{$domain}->{$key} + : ''; + $content .= "$key=$value\n"; + } + $content .= "\n"; + } + spitFile($file, $content); + + return; +} + +sub _setupSupportedThemes +{ + my $self = shift; + + my $supportedThemes = $self->{attrs}->{'desktop::supported_themes'} || ''; + my @supportedThemes = split m{\s*,\s*}, $supportedThemes; + return if !@supportedThemes; + + # Every theme is copied from the folder where it is found first, such that + # themes in the config folder will be preferred to a theme with the same + # name living in the base folder + my @themeBaseDirs = ( + "$self->{openslxConfigPath}/plugins/desktop/themes", + "$self->{openslxBasePath}/lib/plugins/desktop/themes", + ); + THEME: + for my $theme (@supportedThemes) { + THEME_DIR: + foreach my $themeBaseDir (@themeBaseDirs) { + my $gdmThemeDir = "$themeBaseDir/gdm/$theme"; + my $kdmThemeDir = "$themeBaseDir/kdm/$theme"; + next THEME_DIR if !-d $gdmThemeDir && !-d $kdmThemeDir; + # any of both dirs is enough + + # copy theme into plugin-repo folder + vlog(1, "installing theme '$theme'..."); + my $gdmThemeTargetPath = "$self->{pluginRepositoryPath}/themes/gdm"; + mkpath($gdmThemeTargetPath); + slxsystem( + "cp -a $gdmThemeDir $gdmThemeTargetPath/$theme 2>/dev/null" + ) == 0 + or die _tr('unable to copy GDM-theme %s (%s)', $theme, $!); + my $kdmThemeTargetPath = "$self->{pluginRepositoryPath}/themes/kdm"; + mkpath($kdmThemeTargetPath); + slxsystem( + "cp -a $kdmThemeDir $kdmThemeTargetPath/$theme 2>/dev/null" + ) == 0 + or die _tr('unable to copy KDM-theme %s (%s)', $theme, $!); + next THEME; + } + warn _tr('theme "%s" not found - skipped!', $theme); + } + + return; +} + +sub _getAvailableThemes +{ + my $self = shift; + + my %availableThemes; + + # return all themes found in any of these two folders + my @themeBaseDirs = ( + "$self->{openslxConfigPath}/plugins/desktop/themes", + "$self->{openslxBasePath}/lib/plugins/desktop/themes", + ); + for my $themeBaseDir (@themeBaseDirs) { + my @foundGDMThemes + = map { basename $_ } grep { -d $_ } glob("$themeBaseDir/gdm/*"); + @availableThemes{@foundGDMThemes} = (); + my @foundKDMThemes + = map { basename $_ } grep { -d $_ } glob("$themeBaseDir/kdm/*"); + @availableThemes{@foundKDMThemes} = (); + } + + vlog(1, _tr("available themes: %s", join ",", keys %availableThemes)); + + return keys %availableThemes; +} + +1; diff --git a/src/os-plugins/plugins/desktop/XX_desktop.sh b/src/os-plugins/plugins/desktop/XX_desktop.sh new file mode 100644 index 00000000..a8cc71fc --- /dev/null +++ b/src/os-plugins/plugins/desktop/XX_desktop.sh @@ -0,0 +1,33 @@ +# Copyright (c) 2007..2008 - RZ Uni Freiburg +# Copyright (c) 2008 - OpenSLX GmbH +# +# This program/file 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 feedback to feedback@openslx.org +# +# General information about OpenSLX can be found at http://openslx.org +# +# stage3 part of 'desktop' plugin - the runlevel script +# +# script is included from init via the "." load function - thus it has all +# variables and functions available + +if [ -e /initramfs/plugin-conf/desktop.conf ]; then + . /initramfs/plugin-conf/desktop.conf + if [ $desktop_active -ne 0 ]; then + [ $DEBUGLEVEL -gt 0 ] && echo "executing the 'desktop' os-plugin ..."; + + # problem which occurs if exporting was forgotten (quick fix code) + if [ -e /mnt/opt/openslx/plugin-repo/desktop/${desktop_manager}/desktop.sh ] + then . /mnt/opt/openslx/plugin-repo/desktop/${desktop_manager}/desktop.sh + else + error "This shouldn't fail - you might have forgotten to export \ +your system." fatal + fi + + [ $DEBUGLEVEL -gt 0 ] && echo "done with 'desktop' os-plugin ..."; + + fi +fi diff --git a/src/os-plugins/plugins/desktop/themes/gdm/openslx-legacy b/src/os-plugins/plugins/desktop/themes/gdm/openslx-legacy new file mode 120000 index 00000000..d97839a5 --- /dev/null +++ b/src/os-plugins/plugins/desktop/themes/gdm/openslx-legacy @@ -0,0 +1 @@ +openslx \ No newline at end of file diff --git a/src/os-plugins/plugins/desktop/themes/gdm/openslx/GdmGreeterTheme.desktop b/src/os-plugins/plugins/desktop/themes/gdm/openslx/GdmGreeterTheme.desktop new file mode 100755 index 00000000..08e5efce --- /dev/null +++ b/src/os-plugins/plugins/desktop/themes/gdm/openslx/GdmGreeterTheme.desktop @@ -0,0 +1,8 @@ +[GdmGreeterTheme] +Encoding=UTF-8 +Greeter=theme.xml +Name=OpenSLX GDM theme +Description=GDM Port of Daemonic KDM theme for FreeBSD +Author=MJanc / KDM by aceph +Copyright=Creative Commons +Screenshot=screenshot.png \ No newline at end of file diff --git a/src/os-plugins/plugins/desktop/themes/gdm/openslx/color.png b/src/os-plugins/plugins/desktop/themes/gdm/openslx/color.png new file mode 100644 index 00000000..7a0feb03 Binary files /dev/null and b/src/os-plugins/plugins/desktop/themes/gdm/openslx/color.png differ diff --git a/src/os-plugins/plugins/desktop/themes/gdm/openslx/environment.png b/src/os-plugins/plugins/desktop/themes/gdm/openslx/environment.png new file mode 100644 index 00000000..7ad6783a Binary files /dev/null and b/src/os-plugins/plugins/desktop/themes/gdm/openslx/environment.png differ diff --git a/src/os-plugins/plugins/desktop/themes/gdm/openslx/language-selector.png b/src/os-plugins/plugins/desktop/themes/gdm/openslx/language-selector.png new file mode 100644 index 00000000..da016473 Binary files /dev/null and b/src/os-plugins/plugins/desktop/themes/gdm/openslx/language-selector.png differ diff --git a/src/os-plugins/plugins/desktop/themes/gdm/openslx/language-selector_inactive.png b/src/os-plugins/plugins/desktop/themes/gdm/openslx/language-selector_inactive.png new file mode 100644 index 00000000..bb2c8f69 Binary files /dev/null and b/src/os-plugins/plugins/desktop/themes/gdm/openslx/language-selector_inactive.png differ diff --git a/src/os-plugins/plugins/desktop/themes/gdm/openslx/main-runner.png b/src/os-plugins/plugins/desktop/themes/gdm/openslx/main-runner.png new file mode 100644 index 00000000..dde10cc8 Binary files /dev/null and b/src/os-plugins/plugins/desktop/themes/gdm/openslx/main-runner.png differ diff --git a/src/os-plugins/plugins/desktop/themes/gdm/openslx/openslx-logo-main.png b/src/os-plugins/plugins/desktop/themes/gdm/openslx/openslx-logo-main.png new file mode 100644 index 00000000..f98e6517 Binary files /dev/null and b/src/os-plugins/plugins/desktop/themes/gdm/openslx/openslx-logo-main.png differ diff --git a/src/os-plugins/plugins/desktop/themes/gdm/openslx/openslx-logo.png b/src/os-plugins/plugins/desktop/themes/gdm/openslx/openslx-logo.png new file mode 100644 index 00000000..8cfaaf94 Binary files /dev/null and b/src/os-plugins/plugins/desktop/themes/gdm/openslx/openslx-logo.png differ diff --git a/src/os-plugins/plugins/desktop/themes/gdm/openslx/sessions.png b/src/os-plugins/plugins/desktop/themes/gdm/openslx/sessions.png new file mode 100644 index 00000000..00d05f29 Binary files /dev/null and b/src/os-plugins/plugins/desktop/themes/gdm/openslx/sessions.png differ diff --git a/src/os-plugins/plugins/desktop/themes/gdm/openslx/sessions_inactive.png b/src/os-plugins/plugins/desktop/themes/gdm/openslx/sessions_inactive.png new file mode 100644 index 00000000..86bbe642 Binary files /dev/null and b/src/os-plugins/plugins/desktop/themes/gdm/openslx/sessions_inactive.png differ diff --git a/src/os-plugins/plugins/desktop/themes/gdm/openslx/system.png b/src/os-plugins/plugins/desktop/themes/gdm/openslx/system.png new file mode 100644 index 00000000..f7b9e71f Binary files /dev/null and b/src/os-plugins/plugins/desktop/themes/gdm/openslx/system.png differ diff --git a/src/os-plugins/plugins/desktop/themes/gdm/openslx/system_inactive.png b/src/os-plugins/plugins/desktop/themes/gdm/openslx/system_inactive.png new file mode 100644 index 00000000..c3e1719b Binary files /dev/null and b/src/os-plugins/plugins/desktop/themes/gdm/openslx/system_inactive.png differ diff --git a/src/os-plugins/plugins/desktop/themes/gdm/openslx/theme.xml b/src/os-plugins/plugins/desktop/themes/gdm/openslx/theme.xml new file mode 100644 index 00000000..46ef334e --- /dev/null +++ b/src/os-plugins/plugins/desktop/themes/gdm/openslx/theme.xml @@ -0,0 +1,224 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + %c + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/os-plugins/plugins/desktop/themes/gdm/openslx/welcome-time-shadowed.png b/src/os-plugins/plugins/desktop/themes/gdm/openslx/welcome-time-shadowed.png new file mode 100644 index 00000000..79e872c3 Binary files /dev/null and b/src/os-plugins/plugins/desktop/themes/gdm/openslx/welcome-time-shadowed.png differ diff --git a/src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/GdmGreeterTheme.desktop b/src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/GdmGreeterTheme.desktop new file mode 100755 index 00000000..da63ec08 --- /dev/null +++ b/src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/GdmGreeterTheme.desktop @@ -0,0 +1,8 @@ +[GdmGreeterTheme] +Encoding=UTF-8 +Greeter=theme.xml +Name=OpenSLX KDM theme +Description=KDM Port of Daemonic KDM theme for FreeBSD +Author=MJanc / KDM by aceph +Copyright=Creative Commons +Screenshot=screenshot.png diff --git a/src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/KdmGreeterTheme.desktop b/src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/KdmGreeterTheme.desktop new file mode 100755 index 00000000..3cb9069d --- /dev/null +++ b/src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/KdmGreeterTheme.desktop @@ -0,0 +1,8 @@ +[KdmGreeterTheme] +Encoding=UTF-8 +Greeter=theme.xml +Name=OpenSLX KDM theme +Description=KDM Port of Daemonic KDM theme for FreeBSD +Author=MJanc / KDM by aceph +Copyright=Creative Commons +Screenshot=screenshot.png diff --git a/src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/color.png b/src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/color.png new file mode 100644 index 00000000..7a0feb03 Binary files /dev/null and b/src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/color.png differ diff --git a/src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/enter.png b/src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/enter.png new file mode 100644 index 00000000..b646e851 Binary files /dev/null and b/src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/enter.png differ diff --git a/src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/enter_inactive.png b/src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/enter_inactive.png new file mode 100644 index 00000000..e12cfb8e Binary files /dev/null and b/src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/enter_inactive.png differ diff --git a/src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/environment.png b/src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/environment.png new file mode 100644 index 00000000..b9682822 Binary files /dev/null and b/src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/environment.png differ diff --git a/src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/main-runner.png b/src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/main-runner.png new file mode 100644 index 00000000..5b3cf656 Binary files /dev/null and b/src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/main-runner.png differ diff --git a/src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/openslx-logo-main.png b/src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/openslx-logo-main.png new file mode 100644 index 00000000..f98e6517 Binary files /dev/null and b/src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/openslx-logo-main.png differ diff --git a/src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/openslx-logo.png b/src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/openslx-logo.png new file mode 100644 index 00000000..8cfaaf94 Binary files /dev/null and b/src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/openslx-logo.png differ diff --git a/src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/sessions.png b/src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/sessions.png new file mode 100644 index 00000000..00d05f29 Binary files /dev/null and b/src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/sessions.png differ diff --git a/src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/sessions_inactive.png b/src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/sessions_inactive.png new file mode 100644 index 00000000..86bbe642 Binary files /dev/null and b/src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/sessions_inactive.png differ diff --git a/src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/system.png b/src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/system.png new file mode 100644 index 00000000..f7b9e71f Binary files /dev/null and b/src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/system.png differ diff --git a/src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/system_inactive.png b/src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/system_inactive.png new file mode 100644 index 00000000..c3e1719b Binary files /dev/null and b/src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/system_inactive.png differ diff --git a/src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/theme.xml b/src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/theme.xml new file mode 100644 index 00000000..61ae6644 --- /dev/null +++ b/src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/theme.xml @@ -0,0 +1,204 @@ + + + + + + + + + + + + + + + + + + + + + + OpenSLX Workstation (%h) + + + + + + + %c + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Login failed! + Login failed! + Login fehlgeschlagen! + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Session + Session + Sitzung + + + + + + + + + + + + + + + + + + + + System Menu + System Menu + System Menü + + + + + + + + diff --git a/src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/welcome-time-shadowed.png b/src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/welcome-time-shadowed.png new file mode 100644 index 00000000..79e872c3 Binary files /dev/null and b/src/os-plugins/plugins/desktop/themes/kdm/openslx-legacy/welcome-time-shadowed.png differ diff --git a/src/os-plugins/plugins/desktop/themes/kdm/openslx/KdmGreeterTheme.desktop b/src/os-plugins/plugins/desktop/themes/kdm/openslx/KdmGreeterTheme.desktop new file mode 100755 index 00000000..3cb9069d --- /dev/null +++ b/src/os-plugins/plugins/desktop/themes/kdm/openslx/KdmGreeterTheme.desktop @@ -0,0 +1,8 @@ +[KdmGreeterTheme] +Encoding=UTF-8 +Greeter=theme.xml +Name=OpenSLX KDM theme +Description=KDM Port of Daemonic KDM theme for FreeBSD +Author=MJanc / KDM by aceph +Copyright=Creative Commons +Screenshot=screenshot.png diff --git a/src/os-plugins/plugins/desktop/themes/kdm/openslx/color.png b/src/os-plugins/plugins/desktop/themes/kdm/openslx/color.png new file mode 100644 index 00000000..7a0feb03 Binary files /dev/null and b/src/os-plugins/plugins/desktop/themes/kdm/openslx/color.png differ diff --git a/src/os-plugins/plugins/desktop/themes/kdm/openslx/enter.png b/src/os-plugins/plugins/desktop/themes/kdm/openslx/enter.png new file mode 100644 index 00000000..b646e851 Binary files /dev/null and b/src/os-plugins/plugins/desktop/themes/kdm/openslx/enter.png differ diff --git a/src/os-plugins/plugins/desktop/themes/kdm/openslx/enter_inactive.png b/src/os-plugins/plugins/desktop/themes/kdm/openslx/enter_inactive.png new file mode 100644 index 00000000..e12cfb8e Binary files /dev/null and b/src/os-plugins/plugins/desktop/themes/kdm/openslx/enter_inactive.png differ diff --git a/src/os-plugins/plugins/desktop/themes/kdm/openslx/environment.png b/src/os-plugins/plugins/desktop/themes/kdm/openslx/environment.png new file mode 100644 index 00000000..b9682822 Binary files /dev/null and b/src/os-plugins/plugins/desktop/themes/kdm/openslx/environment.png differ diff --git a/src/os-plugins/plugins/desktop/themes/kdm/openslx/main-runner.png b/src/os-plugins/plugins/desktop/themes/kdm/openslx/main-runner.png new file mode 100644 index 00000000..dde10cc8 Binary files /dev/null and b/src/os-plugins/plugins/desktop/themes/kdm/openslx/main-runner.png differ diff --git a/src/os-plugins/plugins/desktop/themes/kdm/openslx/openslx-logo-main.png b/src/os-plugins/plugins/desktop/themes/kdm/openslx/openslx-logo-main.png new file mode 100644 index 00000000..f98e6517 Binary files /dev/null and b/src/os-plugins/plugins/desktop/themes/kdm/openslx/openslx-logo-main.png differ diff --git a/src/os-plugins/plugins/desktop/themes/kdm/openslx/openslx-logo.png b/src/os-plugins/plugins/desktop/themes/kdm/openslx/openslx-logo.png new file mode 100644 index 00000000..8cfaaf94 Binary files /dev/null and b/src/os-plugins/plugins/desktop/themes/kdm/openslx/openslx-logo.png differ diff --git a/src/os-plugins/plugins/desktop/themes/kdm/openslx/sessions.png b/src/os-plugins/plugins/desktop/themes/kdm/openslx/sessions.png new file mode 100644 index 00000000..00d05f29 Binary files /dev/null and b/src/os-plugins/plugins/desktop/themes/kdm/openslx/sessions.png differ diff --git a/src/os-plugins/plugins/desktop/themes/kdm/openslx/sessions_inactive.png b/src/os-plugins/plugins/desktop/themes/kdm/openslx/sessions_inactive.png new file mode 100644 index 00000000..86bbe642 Binary files /dev/null and b/src/os-plugins/plugins/desktop/themes/kdm/openslx/sessions_inactive.png differ diff --git a/src/os-plugins/plugins/desktop/themes/kdm/openslx/system.png b/src/os-plugins/plugins/desktop/themes/kdm/openslx/system.png new file mode 100644 index 00000000..f7b9e71f Binary files /dev/null and b/src/os-plugins/plugins/desktop/themes/kdm/openslx/system.png differ diff --git a/src/os-plugins/plugins/desktop/themes/kdm/openslx/system_inactive.png b/src/os-plugins/plugins/desktop/themes/kdm/openslx/system_inactive.png new file mode 100644 index 00000000..c3e1719b Binary files /dev/null and b/src/os-plugins/plugins/desktop/themes/kdm/openslx/system_inactive.png differ diff --git a/src/os-plugins/plugins/desktop/themes/kdm/openslx/theme.xml b/src/os-plugins/plugins/desktop/themes/kdm/openslx/theme.xml new file mode 100644 index 00000000..d748c776 --- /dev/null +++ b/src/os-plugins/plugins/desktop/themes/kdm/openslx/theme.xml @@ -0,0 +1,232 @@ + + + + +