update apt::preseeded_package template sources to use $lsbdistcodename instead of $debian_release, also expand it to allow for site-apt sources

This commit is contained in:
Micah Anderson 2010-12-07 23:03:15 -05:00
parent ef2ebdffd2
commit dd0552dce1
2 changed files with 7 additions and 5 deletions

8
README
View file

@ -226,10 +226,10 @@ apt::preseeded_package
----------------------
This simplifies installation of packages for which you wish to preseed the
answers to debconf. For example, if you wish to provide a preseed file
for the locales package, you would place the locales.seed file in
'templates/$debian_version/locales.seeds' and then include the following
in your manifest:
answers to debconf. For example, if you wish to provide a preseed file for the
locales package, you would place the locales.seed file in
'site-apt/templates/$lsbdistcodename/locales.seeds' and then include the
following in your manifest:
apt::preseeded_package { locales: }

View file

@ -1,7 +1,9 @@
define apt::preseeded_package ($content = "", $ensure = "installed") {
$seedfile = "/var/cache/local/preseeding/$name.seeds"
$real_content = $content ? {
"" => template ( "$name.seeds", "$debian_version/$name.seeds" ),
"" => template ( "site-apt/$name.seeds",
"site-apt/$lsbdistcodename/$name.seeds",
"$name.seeds", "$lsbdistcodename/$name.seeds" ),
default => $content
}