From: Ian Jackson Date: Fri, 18 Mar 2016 15:15:20 +0000 (+0000) Subject: Debian: Provide cfg_tftp_di_version X-Git-Tag: openstack-v11~378 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=20184abc9dea1b1caf10d36e468addf901e95502;p=people%2Faperard%2Fosstest.git Debian: Provide cfg_tftp_di_version And a shell function to do the same thing. No callers yet. Signed-off-by: Ian Jackson --- diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm index d3eff1eb..f3c2f63d 100644 --- a/Osstest/Debian.pm +++ b/Osstest/Debian.pm @@ -46,6 +46,7 @@ BEGIN { preseed_hook_cmds di_installcmdline_core di_vg_name + cfg_tftp_di_version ); %EXPORT_TAGS = ( ); @@ -1358,6 +1359,12 @@ sub preseed_hook_cmds () { return $preseed; } +sub cfg_tftp_di_version ($) { + my ($suite) = @_; + $suite //= 'x def suite'; # will not find $c{...} + return $c{"TftpDiVersion_$suite"} // $c{TftpDiVersion}; +} + sub debian_guest_suite ($) { my ($gho) = @_; diff --git a/cri-getconfig b/cri-getconfig index 7b75700e..8b76f323 100644 --- a/cri-getconfig +++ b/cri-getconfig @@ -25,6 +25,15 @@ getconfig () { ' } +getconfig_TftpDiVersion_suite () { + perl -e ' + use Osstest; + use Osstest::Debian; + readglobalconfig(); + print cfg_tftp_di_version($ARGV[0]) or die $!; + ' "$1" +} + getrepos() { local repos=`getconfig Repos` if [ -z "$repos" ] ; then