From ed93dec665004b36eb16d67841716944fb79d806 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20M=E4kinen?= Date: Mon, 12 Mar 2012 11:29:15 +0200 Subject: [PATCH] Fixed cups::client for OpenBSD 4.9 and newer. --- cups/manifests/init.pp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/cups/manifests/init.pp b/cups/manifests/init.pp index 3ae0b4d..c2b1dc3 100644 --- a/cups/manifests/init.pp +++ b/cups/manifests/init.pp @@ -21,12 +21,15 @@ class cups::client { case $operatingsystem { openbsd: { - exec { "cups-enable": - command => "echo y | cups-enable", - path => "/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin", - user => root, + exec { "cups-enable": + command => $operatingsystemrelease ? { + /4\.[1-8]/ => "echo y | cups-enable", + default => "sh -c '. /etc/rc.d/cupsd check ; rc_pre'", + }, + path => "/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin", + user => "root", creates => "/usr/bin/lpr.pre-cups", - require => Package["cups"], + require => Package["cups"], } } }