From: Ian Jackson Date: Fri, 4 Dec 2015 18:06:09 +0000 (+0000) Subject: Osstest.pm: Break out and export globalconfigfiles X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=f85eb61c8123aa7d4d44fc55e17c2565ffafc30b;p=people%2Fiwj%2Fosstest.git Osstest.pm: Break out and export globalconfigfiles No functional change; no callers as yet. Signed-off-by: Ian Jackson Acked-by: Ian Campbell --- diff --git a/Osstest.pm b/Osstest.pm index 95e4d467..20b8f629 100644 --- a/Osstest.pm +++ b/Osstest.pm @@ -30,7 +30,7 @@ BEGIN { @ISA = qw(Exporter); @EXPORT = qw( readglobalconfig %c $mjobdb $mhostdb - augmentconfigdefaults + augmentconfigdefaults globalconfigfiles csreadconfig getmethod postfork @@ -124,6 +124,10 @@ sub getmethod { return $r; } +sub globalconfigfiles () { + $ENV{'OSSTEST_CONFIG'} || "$ENV{'HOME'}/.xen-osstest/config"; +} + sub readglobalconfig () { our $readglobalconfig_done; return if $readglobalconfig_done; @@ -135,7 +139,7 @@ sub readglobalconfig () { $c{AuthorizedKeysFiles} = ''; $c{AuthorizedKeysAppend} = ''; - my $cfgfiles = $ENV{'OSSTEST_CONFIG'} || "$ENV{'HOME'}/.xen-osstest/config"; + my $cfgfiles = globalconfigfiles(); my $readcfg; $readcfg = sub ($$) {