aboutsummaryrefslogtreecommitdiff
path: root/manifests/preferences_snippet.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/preferences_snippet.pp')
-rw-r--r--manifests/preferences_snippet.pp8
1 files changed, 3 insertions, 5 deletions
diff --git a/manifests/preferences_snippet.pp b/manifests/preferences_snippet.pp
index 5ae748b..b7dba0d 100644
--- a/manifests/preferences_snippet.pp
+++ b/manifests/preferences_snippet.pp
@@ -13,7 +13,7 @@ define apt::preferences_snippet (
}
if $ensure == 'present' {
- if $custom_preferences == false {
+ if $apt::custom_preferences == false {
fail('Trying to define a preferences_snippet with $custom_preferences set to false.')
}
@@ -31,12 +31,10 @@ define apt::preferences_snippet (
file { "/etc/apt/preferences.d/${name}":
ensure => $ensure,
- owner => root, group => 0, mode => '0644';
+ owner => root, group => 0, mode => '0644',
+ before => Exec['apt_updated'];
}
- # This should really work in the same manner as sources_list and apt_conf
- # snippets, but since the preferences.d directory cannot be used in Debian
- # lenny, we can't generalize without going into ugly special-casing.
case $source {
'': {
case $release {