@@ -92,7 +92,7 @@ BEGIN {
git_massage_url
sshopts authorized_keys
- cfg_tftp_di_version
+ cfg_tftp_di_version controller_ipaddr
remote_perl_script_open remote_perl_script_done
host_reboot target_reboot target_reboot_hard
target_choose_vg target_umount_lv target_await_down
@@ -2401,6 +2401,15 @@ sub cfg_tftp_di_version ($) {
return $c{"TftpDiVersion_$suite"} // $c{TftpDiVersion};
}
+sub controller_ipaddr () {
+ my $addr = $c{ControllerIpAddress};
+ return $addr if defined $addr;
+ $?=$!=0; my $hn = `hostname -f` // die "$? $!";
+ chomp $hn;
+ my $ip = gethostbyname($hn) // die "$hn ?";
+ return inet_ntoa($ip);
+}
+
#---------- webspace for installer ----------
sub await_webspace_fetch_byleaf ($$$$$) {
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> --- Osstest/TestSupport.pm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)