diff options
author | Markus Strauss <Markus@ITstrauss.eu> | 2011-10-30 17:07:21 -0400 |
---|---|---|
committer | Markus Strauss <Markus@ITstrauss.eu> | 2011-10-30 17:07:21 -0400 |
commit | 22946cbbade150e9a3d8e7d0c0b1ad585182b30f (patch) | |
tree | f690aaef6a078339d7564ee896c14b00b1930581 /manifests | |
parent | 384137fe6814498e87a07cc5b74ae2bcb59f895b (diff) | |
download | puppet-runit-22946cbbade150e9a3d8e7d0c0b1ad585182b30f.tar.gz puppet-runit-22946cbbade150e9a3d8e7d0c0b1ad585182b30f.tar.bz2 |
moving the $logdir default value out of the definition to avoid compilation warnings
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/service.pp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/manifests/service.pp b/manifests/service.pp index 0fed6d9..5d7d928 100644 --- a/manifests/service.pp +++ b/manifests/service.pp @@ -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") |