Merge branch 'master' of bitbucket.org:tmakinen/puppet
This commit is contained in:
commit
6b21bb54ef
3 changed files with 17 additions and 8 deletions
|
@ -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
|
||||
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 }
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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"],
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue