Provide generic names for shortcuts - test.
authorAndreas Schiermeier <andreas@schiermeier.name>
Mon, 9 May 2016 23:59:36 +0000 (01:59 +0200)
committerAndreas Schiermeier <andreas@schiermeier.name>
Mon, 9 May 2016 23:59:36 +0000 (01:59 +0200)
modules/desktop/manifests/init.pp

index 1b0858d..cf8ad6f 100644 (file)
@@ -31,14 +31,21 @@ class desktop {
 
        file { '/etc/skel/Desktop/leafpad.desktop':
                source => '/usr/share/applications/leafpad.desktop',
+               replace => false,
                require => [
                        Package['lxde'],
                        File['/etc/skel/Desktop'],
                ],
        }
 
+       exec { 'fix-desktop-leafpad':
+               command => 'sed -i "/^Name/ s/=.*/=Notes/;" /etc/skel/Desktop/leafpad.desktop',
+               onlyif => 'egrep -vq "Name.*=Notes"',
+       }
+
        file { '/etc/skel/Desktop/galculator.desktop':
                source => '/usr/share/applications/galculator.desktop',
+               replace => false,
                require => [
                        Package['lxde'],
                        File['/etc/skel/Desktop'],
@@ -55,6 +62,7 @@ class desktop {
        
        file { '/etc/skel/Desktop/florence.desktop':
                source => '/usr/share/applications/florence.desktop',
+               replace => false,
                require => [
                        Package['florence'],
                        File['/etc/skel/Desktop'],
@@ -106,6 +114,7 @@ class desktop {
 
        file { '/etc/skel/Desktop/iceweasel.desktop':
                source => '/usr/share/applications/iceweasel.desktop',
+               replace => false,
                require => [
                        Package['iceweasel'],
                        File['/etc/skel/Desktop'],