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

Last change on this file since 679 was 677, checked in by sebas@…, 14 years ago

para que se ejecute siempre el comando

File size: 5.1 KB
Line 
1# copyright <sebas @ koumbit.org>
2# copyright <josx @ interorganic.com.ar >
3# Licence: GPL
4#
5
6class escritorio::gnome-theme::xp {
7    $local_path = "/dist/svn-redcta"
8    $local_name = "gnome-theme-xp"
9    $jaunty_script = "change-default-to-xp.sh"
10    $lucid_script = "lucid-escritorio-xp.sh"
11    $jaunty_file_path = "$local_path/$local_name/$jaunty_script"
12    $lucid_file_path =  "$local_path/$local_name/$lucid_script"
13
14    case $operatingsystem {
15        Ubuntu: {
16            case $lsbdistcodename {
17                Jaunty: {
18                    $ejecuta = $jaunty_file_path
19                }
20                Lucid: {
21                    $ejecuta = $lucid_file_path
22                }
23                default: {
24                    err("No hay tema para $operatingsystem - $lsbdistcodename")
25                }   
26            }
27        }
28    }
29   
30    svn::checkout { gnome-theme-xp:
31        repository => "https://svn.redcta.org.ar/proyectos/redcta/trunk/gnome-theme-xp",
32        local_path => $local_path,
33        local_name => $local_name,
34        before => [ File["$ejecuta"] , Exec["$ejecuta"]  ],
35    }
36
37    file { "/dist/svn-redcta/gnome-theme-xp/change-default-to-xp.sh":
38        ensure => "present",
39        owner => "root", group => "root", mode => "755", checksum => mtime,
40    }
41
42    file { "$lucid_file_path":
43        ensure => "present",
44        owner => "root", group => "root", mode => "755", checksum => mtime,
45    }
46
47    #   Esto no deberia hacerse, solamente habria usar ejecutar, lo dejo por jaunty
48    #   ver changeset [643]
49    #   falta poner refresh = true en lucid
50    case $operatingsystem {
51        Ubuntu: {
52            case $lsbdistcodename {
53                Jaunty: {
54                    exec { "$jaunty_file_path":
55                    refreshonly => true,
56                    subscribe => File["/dist/svn-redcta/gnome-theme-xp/change-default-to-xp.sh"]
57                    }
58                }
59                Lucid: {
60                    exec { "$lucid_file_path":
61                    refreshonly => true,
62                    subscribe => File["$lucid_file_path"]
63                    }
64                }
65                default: {
66                    err("No hay tema para $operatingsystem - $lsbdistcodename")
67                }   
68            }
69        }
70        default: {
71            err("No hay tema para $operatingsystem")
72        }   
73    }
74}
75
76
77class escritorio::iconos {
78
79    file  { "/etc/X11/Xsession.d/65xdg-user-desktop-icons-update":
80        ensure => "/dist/svn-redcta/gnome-theme-xp/Xsession.d/65xdg-user-desktop-icons-update"
81    }
82}
83
84
85class escritorio::fondos::cta {
86
87    svn::checkout { escritorio-fondos-cta:
88        repository => "https://svn.redcta.org.ar/proyectos/redcta/trunk/escritorio-fondos-cta",
89        local_path => "/dist/svn-redcta",
90        local_name => "escritorio-fondos-cta"
91    }
92
93    file  { "/usr/share/backgrounds/wpiedras-hojitas.jpg":
94        ensure => "/dist/svn-redcta/escritorio-fondos-cta/wpiedras-hojitas.jpg"
95    }
96
97    file { "/usr/share/backgrounds/wpiedras-verdecito.jpg":
98        ensure => "/dist/svn-redcta/escritorio-fondos-cta/wpiedras-verdecito.jpg"
99    }
100}
101
102
103class escritorio::autostart-off {
104
105    define deshabilita_servicios($archivos) {
106        deshabilita_servicio { $archivos: archivo => $name }
107    }
108
109    define deshabilita_servicio($archivo) {
110        file { "${archivo}/$name"  : ensure => present, }
111
112        line { "verdadero$name" :
113            file   => "${archivo}/$name",
114            line   => "X-GNOME-Autostart-enabled=true",
115            ensure => absent,
116        }
117        line { "falso$name":
118            file   => "${archivo}/$name" ,
119            line   => "X-GNOME-Autostart-enabled=false",
120            ensure => present,
121        }
122    }
123
124    case $operatingsystem {
125    Ubuntu: {
126        case $lsbdistcodename {
127            Jaunty: {
128                deshabilita_servicios { "/etc/xdg/autostart":
129                    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" ],
130                }
131            } 
132            Lucid: {
133                deshabilita_servicios { "/etc/xdg/autostart":
134                    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" ],
135                }
136            }
137            default: {
138                err("No hay deshabilitacion de servicios para $opertatingsystem - $lsbdistcodename")
139            }
140        }
141    }
142    default: {
143        err("No hay deshabilitacion de servicios para $operatingsystem")   
144    }
145    }   
146}
147
Note: See TracBrowser for help on using the repository browser.