]> gitweb.fluxo.info Git - puppet-samba.git/commitdiff
Add support for Gentoo OS
authorVladimir Rutsky <rutsky.vladimir@gmail.com>
Tue, 19 Mar 2013 12:40:40 +0000 (16:40 +0400)
committerAdam Jahn <ajjahn@gmail.com>
Wed, 20 Mar 2013 01:21:41 +0000 (21:21 -0400)
manifests/server/service.pp

index 2c6f590be8ec65f77320b067b3ed5f3edc061835..4bbe47f6496869d39d825f9f0cee895134451c52 100644 (file)
@@ -1,7 +1,18 @@
 class samba::server::service ($ensure = running, $enable = true) {
   case $::osfamily {
-      Redhat:  { $service_name = 'smb' }
-      Debian:  { $service_name = 'smbd' }
+      Redhat: { $service_name = 'smb' }
+      Debian: { $service_name = 'smbd' }
+      Gentoo: { $service_name = 'samba' }
+
+      # Currently Gentoo has $::osfamily = "Linux". This should change in
+      # Factor 1.7.0 <http://projects.puppetlabs.com/issues/17029>, so
+      # adding workaround.
+      Linux: {
+        case $::operatingsystem {
+          Gentoo:  { $service_name = 'samba' }
+          default: { fail("$::operatingsystem is not supported by this module.") }
+        }
+      }
       default: { fail("$::osfamily is not supported by this module.") }
     }