diff --git a/custom/lib/puppet/provider/service/openbsd.rb b/custom/lib/puppet/provider/service/openbsd.rb index dcf8044..0e0947c 100644 --- a/custom/lib/puppet/provider/service/openbsd.rb +++ b/custom/lib/puppet/provider/service/openbsd.rb @@ -65,13 +65,14 @@ Puppet::Type.type(:service).provide :openbsd, :parent => :base do def enabled? name = @resource[:name] rcvar = self.rcvar + rcvar_name = self.rcvar_name rcvar_value = self.rcvar_value pkg_scripts = self.pkg_scripts - if rcvar.nil? and not pkg_scripts.include?(name) - return :false - end - if rcvar_value.nil? or rcvar_value == "NO" - return :false + if rcvar_name.end_with?("_flags") + return :false if rcvar.nil? and not pkg_scripts.include?(name) + return :false if rcvar_value.nil? or rcvar_value == "NO" + else + return :false if rcvar_value != "YES" end :true end @@ -96,7 +97,11 @@ Puppet::Type.type(:service).provide :openbsd, :parent => :base do rcvar_value = start[/^#{binary}\s*(.*)/, 1] end end - s += "%s=\"%s\"\n" % [rcvar_name, rcvar_value] + if rcvar_name.end_with?("_flags") + s += "%s=\"%s\"\n" % [rcvar_name, rcvar_value] + else + s += "%s=YES\n" % rcvar_name + end pkg_scripts << name if rcvar.nil? and not pkg_scripts.include?(name) s += "pkg_scripts=\"%s\"\n" % pkg_scripts.join(" ") File.open(@@rcconf_local, "w") { |f| f << s } diff --git a/munin/manifests/init.pp b/munin/manifests/init.pp index 334220a..f4b02a9 100644 --- a/munin/manifests/init.pp +++ b/munin/manifests/init.pp @@ -52,7 +52,7 @@ class munin::node { } exec { "munin-node-configure": - command => "munin-node-configure --shell 2>/dev/null | /bin/sh", + command => "munin-node-configure --shell --remove-also 2>/dev/null | /bin/sh", path => "/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin", user => root, refreshonly => true, diff --git a/network/manifests/init.pp b/network/manifests/init.pp index a955025..48f3d76 100644 --- a/network/manifests/init.pp +++ b/network/manifests/init.pp @@ -491,6 +491,8 @@ class network::helper::vlan { # - # $netmask: # - +# $options: +# - # # === Sample usage # @@ -500,7 +502,8 @@ class network::helper::vlan { # netmask => "255.255.0.0", # } # -define network::vlan($device, $ipaddr = "none", $netmask = "none") { +define network::vlan($device, $ipaddr = "none", $netmask = "none", + $options = []) { case $operatingsystem { openbsd: { network::interface { "vlan${name}": @@ -514,6 +517,7 @@ define network::vlan($device, $ipaddr = "none", $netmask = "none") { network::interface { "${device}.${name}": ipaddr => $ipaddr, netmask => $netmask, + options => $options, require => Augeas["enable-vlan-support"], } }