Added support for OpenBSD into samba module.

This commit is contained in:
Timo Mkinen 2009-09-16 08:21:20 +03:00
parent caede51adb
commit d1b8b02657

View file

@ -6,12 +6,35 @@ class samba::server {
ensure => installed,
}
case $operatingsystem {
openbsd: {
service { "nmbd":
ensure => running,
enable => true,
binary => "/usr/local/libexec/nmbd",
start => "/usr/local/libexec/nmbd -D",
require => File["/etc/samba/smb.conf"],
subscribe => File["/etc/samba/smb.conf"],
}
service { "smbd":
ensure => running,
enable => true,
binary => "/usr/local/libexec/smbd",
start => "/usr/local/libexec/smbd -D",
require => File["/etc/samba/smb.conf"],
subscribe => File["/etc/samba/smb.conf"],
}
}
default: {
service { "smb":
ensure => running,
enable => true,
hasstatus => true,
hasrestart => true,
require => File["/etc/samba/smb.conf"],
subscribe => File["/etc/samba/smb.conf"],
}
}
}
file { "/etc/samba/smb.conf":
@ -20,9 +43,11 @@ class samba::server {
"puppet:///files/samba/smb.conf", ],
mode => 0644,
owner => root,
group => root,
group => $operatingsystem ? {
openbsd => wheel,
default => root,
},
require => Package["samba"],
notify => Service["smb"],
}
file { "/etc/samba/lmhosts":
@ -32,7 +57,10 @@ class samba::server {
"puppet:///samba/lmhosts", ],
mode => 0644,
owner => root,
group => root,
group => $operatingsystem ? {
openbsd => wheel,
default => root,
},
require => Package["samba"],
}
@ -57,7 +85,8 @@ class samba::domainmember {
command => "net join -U ${samba_join_user}%'${samba_join_pass}'",
path => "/bin:/usr/bin:/sbin:/usr/sbin",
onlyif => "rpcclient localhost -c 'srvinfo' -U root%'' 2>&1 | grep 'NT_STATUS_CANT_ACCESS_DOMAIN_INFO'",
require => Service["smb"],
require => [ Package["samba"],
File["/etc/samba/smb.conf"], ],
}
}