[Mageia-sysadm] [319] - rewrite the link setup part, as the array do not work like I believed they would

root at mageia.org root at mageia.org
Fri Nov 19 01:59:56 CET 2010


Revision: 319
Author:   misc
Date:     2010-11-19 01:59:56 +0100 (Fri, 19 Nov 2010)
Log Message:
-----------
- rewrite the link setup part, as the array do not work like I believed they would

Modified Paths:
--------------
    puppet/modules/subversion/manifests/init.pp

Modified: puppet/modules/subversion/manifests/init.pp
===================================================================
--- puppet/modules/subversion/manifests/init.pp	2010-11-19 00:57:58 UTC (rev 318)
+++ puppet/modules/subversion/manifests/init.pp	2010-11-19 00:59:56 UTC (rev 319)
@@ -79,6 +79,18 @@
         }
     }
 
+   
+    # FIXME ugly
+    define pre_commit_link($directory) {
+	file { "pre_commit_link-${name}":
+	    path => "$directory/$name",
+	    ensure => "/usr/local/share/subversion/pre-commit.d/$name",
+	    owner => root,
+	    group => root,
+	    mode => 755,
+	}
+    } 
+
     # TODO 
     #   deploy a cronjob to make a backup file ( ie, dump in some directory )
 
@@ -148,15 +160,10 @@
             }
         }
 
-        $pre_commit_check = ['no_commit_log','no_root', $syntax_check]
 
-        file { "$name/hooks/pre-commit.d/$pre_commit_check":
-            ensure => "/usr/local/share/subversion/pre-commit.d/$pre_commit_check",
-            owner => root,
-            group => root,
-            mode => 755
-        }
-
+	pre_commit_link { ['no_empty_message','no_root_commit', $syntax_check]: 
+		directory => "$name/hooks/pre-commit.d/"
+	}
     }
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/mageia-sysadm/attachments/20101119/7d1bcd1e/attachment.html>


More information about the Mageia-sysadm mailing list