From e00971ce3f82328ece587f3e9270a9f5e9e4e5a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20M=E4kinen?= Date: Tue, 15 Mar 2011 00:20:27 +0200 Subject: [PATCH] Fixed tftp module for OpenBSD. --- tftp/manifests/init.pp | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/tftp/manifests/init.pp b/tftp/manifests/init.pp index a229ed7..7ee2b73 100644 --- a/tftp/manifests/init.pp +++ b/tftp/manifests/init.pp @@ -26,8 +26,11 @@ class tftp::server { file { "/srv/tftpboot": ensure => directory, mode => 0755, - owner => root, - group => root, + owner => "root", + group => $operatingsystem ? { + "openbsd" => "wheel", + default => "root", + }, seltype => "tftpdir_t", } } @@ -64,13 +67,15 @@ class tftp::server { } } - package { "tftp-server": - name => $operatingsystem ? { - ubuntu => "tftpd-hpa", - debian => "tftpd-hpa", - default => "tftp-server", - }, - ensure => installed, + if $operatingsystem != "OpenBSD" { + package { "tftp-server": + name => $operatingsystem ? { + ubuntu => "tftpd-hpa", + debian => "tftpd-hpa", + default => "tftp-server", + }, + ensure => installed, + } } case $operatingsystem { @@ -87,7 +92,10 @@ class tftp::server { include inetd::server inetd::service { "tftp": ensure => present, - require => Package["tftp-server"], + require => $operatingsystem ? { + "openbsd" => undef, + default => Package["tftp-server"], + }, } } }