From fefc399e7e28ec871d91089d535073c2bc705009 Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Fri, 10 Dec 2010 16:35:10 -0500 Subject: this change makes sure that munin-common is installed before munin-node is installed on Debian systems that are not lenny (would be nice if we could use operators for lsbdistcode name like 'if $lsbdistcodename >> "lenny") on Debian Squeeze and later, the munin-node package requires that munin-common be installed. this would normally be handled automatically by the packaging system, but if you utilize the $munin_node_ensure_version variable to set it to the backports version, and you have backports pinned properly (as the shared-apt module does it), it will fail to install the munin-common package from backports. you would think that this change should go in the debian.pp, but that is not possible because debian.pp inherits client/package.pp and thus the order happens wrong --- manifests/client/package.pp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'manifests/client') diff --git a/manifests/client/package.pp b/manifests/client/package.pp index 0fc3529..921d996 100644 --- a/manifests/client/package.pp +++ b/manifests/client/package.pp @@ -2,10 +2,24 @@ class munin::client::package inherits munin::client::base { if $munin_node_ensure_version == '' { $munin_node_ensure_version = 'installed' } + if $operatingsystem == "Debian" and $lsbdistcodename != "lenny" { + package { 'munin-common': + before => Package['munin-node'], + ensure => $munin_node_ensure_version; + } + + Package['munin-node']{ + require => Package['munin-common'], + } + } + + package { 'munin-node': ensure => $munin_node_ensure_version } + Service['munin-node']{ require => Package[munin-node], } + File['/etc/munin/munin-node.conf']{ # this has to be installed before the package, so the postinst can # boot the munin-node without failure! -- cgit v1.2.3