]> gitweb.fluxo.info Git - puppet-runit.git/commitdiff
moving the $logdir default value out of the definition to avoid compilation warnings
authorMarkus Strauss <Markus@ITstrauss.eu>
Sun, 30 Oct 2011 21:07:21 +0000 (17:07 -0400)
committerMarkus Strauss <Markus@ITstrauss.eu>
Sun, 30 Oct 2011 21:07:21 +0000 (17:07 -0400)
manifests/service.pp

index 0fed6d99d5d5eed1bee85b17557dbe9770979950..5d7d928f433bf780cb93a2984200581e751d9be5 100644 (file)
@@ -14,8 +14,16 @@ define runit::service (
   # logging stuff
   $logger  = true,       # shall we setup an logging service;  if you use 'command' before, 
                          # all output from command will be logged automatically to $logdir/current
-  $logdir  = "${rundir}/log"
+  $_logdir  = undef
 ) {
+  
+  # using the following construct, because '$logdir = "${rundir}/log"' in the
+  # define statement produces compilation warnings  
+  if $_logdir == undef {
+    $logdir = "${rundir}/log"
+  } else {
+    $logdir = $_logdir
+  }
 
   # FixMe: Validate parameters
   # fail("Only one of 'command', 'content', or 'source' parameters is allowed")