source: trunk/puppet/modules/puppet-escritorio/manifests/classes/gnome.pp @ 640

Last change on this file since 640 was 640, checked in by josx@…, 14 years ago

Agregando deshabilitacion de servicios para Lucid

File size: 3.6 KB
Line 
1# copyright <sebas @ koumbit.org>
2# copyright <josx @ interorganic.com.ar >
3# Licence: GPL
4#
5
6class escritorio::gnome-theme::xp {
7
8    svn::checkout { gnome-theme-xp:
9        repository => "https://svn.redcta.org.ar/proyectos/redcta/trunk/gnome-theme-xp",
10        local_path => "/dist/svn-redcta",
11        local_name => "gnome-theme-xp",
12    }
13
14    file { "/dist/svn-redcta/gnome-theme-xp/change-default-to-xp.sh":
15        ensure => "present",
16        owner => "root", group => "root", mode => "755", checksum => mtime,
17#       require => svn::checkout["gnome-theme-xp"],
18    }
19
20## TODO: exec this when there is a svn checkout
21    exec { "/dist/svn-redcta/gnome-theme-xp/change-default-to-xp.sh":
22        refreshonly => true,
23        subscribe => File["/dist/svn-redcta/gnome-theme-xp/change-default-to-xp.sh"]
24    }
25}
26
27
28class escritorio::iconos {
29
30    file  { "/etc/X11/Xsession.d/65xdg-user-desktop-icons-update":
31        ensure => "/dist/svn-redcta/gnome-theme-xp/Xsession.d/65xdg-user-desktop-icons-update"
32    }
33}
34
35
36class escritorio::fondos::cta {
37
38    svn::checkout { escritorio-fondos-cta:
39        repository => "https://svn.redcta.org.ar/proyectos/redcta/trunk/escritorio-fondos-cta",
40        local_path => "/dist/svn-redcta",
41        local_name => "escritorio-fondos-cta"
42    }
43
44    file  { "/usr/share/backgrounds/wpiedras-hojitas.jpg":
45        ensure => "/dist/svn-redcta/escritorio-fondos-cta/wpiedras-hojitas.jpg"
46    }
47
48    file { "/usr/share/backgrounds/wpiedras-verdecito.jpg":
49        ensure => "/dist/svn-redcta/escritorio-fondos-cta/wpiedras-verdecito.jpg"
50    }
51}
52
53
54class escritorio::autostart-off {
55
56    define deshabilita_servicios($archivos) {
57        deshabilita_servicio { $archivos: archivo => $name }
58    }
59
60    define deshabilita_servicio($archivo) {
61        file { "${archivo}/$name"  : ensure => present, }
62
63        line { "verdadero$name" :
64            file   => "${archivo}/$name",
65            line   => "X-GNOME-Autostart-enabled=true",
66            ensure => absent,
67        }
68        line { "falso$name":
69            file   => "${archivo}/$name" ,
70            line   => "X-GNOME-Autostart-enabled=false",
71            ensure => present,
72        }
73    }
74
75    case $operatingsystem {
76    Ubuntu: {
77        case $lsbdistcodename {
78            Jaunty: {
79                deshabilita_servicios { "/etc/xdg/autostart":
80                    archivos => [ "vino-server.desktop", "update-notifier.desktop", "bluetooth-applet.desktop", "evolution-alarm-notify.desktop", "jockey-gtk.desktop", "gnome-at-session.desktop", "gnome-power-manager.desktop" ],
81                }
82            } 
83            Lucid: {
84                deshabilita_servicios { "/etc/xdg/autostart":
85                    archivos => [ "at-spi-registryd.desktop", "bluetooth-applet.desktop", "gwibber.desktop", "evolution-alarm-notify.desktop",  "indicator-applet.desktop", "gdu-notification-daemon.desktop",  "jockey-gtk.desktop", "gnome-at-session.desktop", "nm-applet.desktop", "gnome-keyring-pkcs11.desktop", "polkit-gnome-authentication-agent-1.desktop", "gnome-keyring-secrets.desktop", "polkit-kde-authentication-agent-1.desktop", "gnome-keyring-ssh.desktop", "print-applet.desktop", "gnome-power-manager.desktop", "pulseaudio.desktop", "update-notifier.desktop", "vino-server.desktop", "user-dirs-update-gtk.desktop", "gnome-settings-daemon.desktop", "gnome-user-share.desktop" ],
86                }
87            }
88            default: {
89                err("No hay deshabilitacion de servicios para $opertatingsystem - $lsbdistcodename")
90            }
91        }
92    }
93    default: {
94        err("No hay deshabilitacion de servicios para $operatingsystem")   
95    }
96    }   
97}
98
Note: See TracBrowser for help on using the repository browser.