Defined Type: portage::postsync
- Defined in:
- manifests/postsync.pp
Overview
Define: portage::postsync
Install custom postsync scripts
Parameters
- ensure
-
The ensure value for the scrypt
- content
-
The content of the script.
- source
-
The source path to the script
Example
portage::postsync { 'system-bell': ensure => present, content => "#!/bin/sh\necho -e \"\\a\"" } portage::postsync { 'regen-layman-cache': ensure => present, source => 'puppet:///modules/site-files/regen-layman-cache.sh', }
See Also
-
portage-utils: www.gentoo.org/doc/en/portage-utils.xml
-
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'manifests/postsync.pp', line 34
define portage::postsync(
$ensure = 'present',
$content = undef,
$source = undef,
) {
include portage
if ($content and $source) or !($content and $source) {
fail('One of [$content, $source] must be specified')
}
if $content {
file { "portage_postsync_${name}":
ensure => $ensure,
path => "/etc/portage/postsync.d/${name}",
content => $content,
mode => '0755',
require => File['/etc/portage/postsync.d'],
}
}
if $source {
file { "portage_postsync_${name}":
ensure => $ensure,
path => "/etc/portage/postsync.d/${name}",
source => $source,
mode => '0755',
require => File['/etc/portage/postsync.d'],
}
}
}
|