Merge branch 'master' of bitbucket.org:tmakinen/puppet

This commit is contained in:
Timo Mkinen 2012-03-13 14:50:48 +02:00
commit 6b21bb54ef
3 changed files with 17 additions and 8 deletions

View file

@ -65,13 +65,14 @@ Puppet::Type.type(:service).provide :openbsd, :parent => :base do
def enabled? def enabled?
name = @resource[:name] name = @resource[:name]
rcvar = self.rcvar rcvar = self.rcvar
rcvar_name = self.rcvar_name
rcvar_value = self.rcvar_value rcvar_value = self.rcvar_value
pkg_scripts = self.pkg_scripts pkg_scripts = self.pkg_scripts
if rcvar.nil? and not pkg_scripts.include?(name) if rcvar_name.end_with?("_flags")
return :false return :false if rcvar.nil? and not pkg_scripts.include?(name)
end return :false if rcvar_value.nil? or rcvar_value == "NO"
if rcvar_value.nil? or rcvar_value == "NO" else
return :false return :false if rcvar_value != "YES"
end end
:true :true
end end
@ -96,7 +97,11 @@ Puppet::Type.type(:service).provide :openbsd, :parent => :base do
rcvar_value = start[/^#{binary}\s*(.*)/, 1] rcvar_value = start[/^#{binary}\s*(.*)/, 1]
end end
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) pkg_scripts << name if rcvar.nil? and not pkg_scripts.include?(name)
s += "pkg_scripts=\"%s\"\n" % pkg_scripts.join(" ") s += "pkg_scripts=\"%s\"\n" % pkg_scripts.join(" ")
File.open(@@rcconf_local, "w") { |f| f << s } File.open(@@rcconf_local, "w") { |f| f << s }

View file

@ -52,7 +52,7 @@ class munin::node {
} }
exec { "munin-node-configure": 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", path => "/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin",
user => root, user => root,
refreshonly => true, refreshonly => true,

View file

@ -491,6 +491,8 @@ class network::helper::vlan {
# - # -
# $netmask: # $netmask:
# - # -
# $options:
# -
# #
# === Sample usage # === Sample usage
# #
@ -500,7 +502,8 @@ class network::helper::vlan {
# netmask => "255.255.0.0", # netmask => "255.255.0.0",
# } # }
# #
define network::vlan($device, $ipaddr = "none", $netmask = "none") { define network::vlan($device, $ipaddr = "none", $netmask = "none",
$options = []) {
case $operatingsystem { case $operatingsystem {
openbsd: { openbsd: {
network::interface { "vlan${name}": network::interface { "vlan${name}":
@ -514,6 +517,7 @@ define network::vlan($device, $ipaddr = "none", $netmask = "none") {
network::interface { "${device}.${name}": network::interface { "${device}.${name}":
ipaddr => $ipaddr, ipaddr => $ipaddr,
netmask => $netmask, netmask => $netmask,
options => $options,
require => Augeas["enable-vlan-support"], require => Augeas["enable-vlan-support"],
} }
} }