aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Schmitt <david@schmitt.edv-bus.at>2008-02-14 18:24:44 +0100
committerDavid Schmitt <david@schmitt.edv-bus.at>2008-02-14 18:24:44 +0100
commitf1428f324a5c59f0f01fd7d5ec6c59c8565743af (patch)
tree1a26cfb8b8ea0dbae40b1f5cfc1b091b8fd01391
parentffa7b203c024c7c9a90d00009eb40849990fc933 (diff)
downloadpuppet-common-f1428f324a5c59f0f01fd7d5ec6c59c8565743af.tar.gz
puppet-common-f1428f324a5c59f0f01fd7d5ec6c59c8565743af.tar.bz2
more BSD compatability from admin@immerda.ch
-rw-r--r--manifests/defines/concatenated_file.pp4
-rw-r--r--manifests/defines/config_file.pp2
-rw-r--r--manifests/defines/line.pp8
-rw-r--r--manifests/defines/modules_dir.pp4
-rw-r--r--manifests/init.pp3
5 files changed, 11 insertions, 10 deletions
diff --git a/manifests/defines/concatenated_file.pp b/manifests/defines/concatenated_file.pp
index ff7bf53..e3dbe23 100644
--- a/manifests/defines/concatenated_file.pp
+++ b/manifests/defines/concatenated_file.pp
@@ -19,7 +19,7 @@ define concatenated_file (
$header = '',
# a file with content to append
$footer = '',
- $mode = 0644, $owner = root, $group = root
+ $mode = 0644, $owner = root, $group = 0
)
{
@@ -70,7 +70,7 @@ define concatenated_file (
# The file can be referenced as File["cf_part_${name}"]
define concatenated_file_part (
$dir, $content = '', $ensure = present,
- $mode = 0644, $owner = root, $group = root
+ $mode = 0644, $owner = root, $group = 0
)
{
diff --git a/manifests/defines/config_file.pp b/manifests/defines/config_file.pp
index c57c9a3..3e6bc06 100644
--- a/manifests/defines/config_file.pp
+++ b/manifests/defines/config_file.pp
@@ -33,7 +33,7 @@ define config_file ($content = '', $source = '', $ensure = 'present') {
# keep old versions on the server
backup => server,
# default permissions for config files
- mode => 0644, owner => root, group => root,
+ mode => 0644, owner => root, group => 0,
# really detect changes to this file
checksum => md5,
}
diff --git a/manifests/defines/line.pp b/manifests/defines/line.pp
index 3f7c4c0..2eb8f98 100644
--- a/manifests/defines/line.pp
+++ b/manifests/defines/line.pp
@@ -27,13 +27,13 @@ define line($file, $line, $ensure = 'present') {
case $ensure {
default : { err ( "unknown ensure value '${ensure}'" ) }
present: {
- exec { "/bin/echo '${line}' >> '${file}'":
- unless => "/bin/grep -qFx '${line}' '${file}'"
+ exec { "echo '${line}' >> '${file}'":
+ unless => "grep -qFx '${line}' '${file}'"
}
}
absent: {
- exec { "/usr/bin/perl -ni -e 'print unless /^\\Q${line}\\E\$/' '${file}'":
- onlyif => "/bin/grep -qFx '${line}' '${file}'"
+ exec { "perl -ni -e 'print unless /^\\Q${line}\\E\$/' '${file}'":
+ onlyif => "grep -qFx '${line}' '${file}'"
}
}
}
diff --git a/manifests/defines/modules_dir.pp b/manifests/defines/modules_dir.pp
index 657b54d..cc80eeb 100644
--- a/manifests/defines/modules_dir.pp
+++ b/manifests/defines/modules_dir.pp
@@ -7,7 +7,7 @@
# Usage:
# modules_dir { ["common", "common/dir1", "common/dir2" ]: }
define modules_dir (
- $mode = 0644, $owner = root, $group = root
+ $mode = 0644, $owner = root, $group = 0
)
{
$dir = "/var/lib/puppet/modules/${name}"
@@ -18,7 +18,7 @@ define modules_dir (
"/var/lib/puppet/modules/${name}":
# workaround
#source => [ "puppet://$servername/${name}/modules_dir", "puppet://$servername/common/empty"],
- source => "puppet://$servername/files/empty",
+ source => "puppet://$servername/common/empty",
checksum => mtime,
recurse => true, purge => true, force => true,
mode => $mode, owner => $owner, group => $group;
diff --git a/manifests/init.pp b/manifests/init.pp
index 577b0c6..d284782 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -8,8 +8,9 @@ file {
"/var/lib/puppet/modules":
ensure => directory,
source => "puppet://$servername/common/modules/",
+ ignore => ".svn",
recurse => true, purge => true, force => true,
- mode => 0755, owner => root, group => root;
+ mode => 0755, owner => root, group => 0;
}
import "defines/*.pp"