From: Anthony PERARD Date: Tue, 12 Jun 2018 17:02:12 +0000 (+0100) Subject: TestSupport: host_vg_name X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=38c851fb57b0f1041c8d9129dbbdfb6f74bb38d4;p=people%2Faperard%2Fosstest.git TestSupport: host_vg_name --- diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index 970525c3..e9455ca2 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -144,6 +144,7 @@ BEGIN { host_install_recipe_create host_installer_path host_installcmdline_core + host_vg_name ); %EXPORT_TAGS = ( ); @@ -2967,4 +2968,15 @@ sub host_installcmdline_core ($) { } } +sub host_vg_name ($) { + my ($ho) = @_; + if ($ho->{OS} eq "debian") { + return \&Osstest::Debian::di_vg_name; + } elsif (is_host_redhat_derived($ho)) { + return \&Osstest::RedHat::ks_vg_name; + } else { + die "Unknown OS $ho->{OS}"; + } +} + 1; diff --git a/ts-host-install b/ts-host-install index a38dd96d..5c8b4206 100755 --- a/ts-host-install +++ b/ts-host-install @@ -90,7 +90,7 @@ END await_tcp(get_timeout($ho,'reboot',$timeout{Sshd}), 14,$ho); - our $vgname = di_vg_name($ho); + our $vgname = host_vg_name($ho)->($ho); if ($ho->{Suite} =~ m/lenny/) { target_editfile_root($ho, '/boot/grub/menu.lst', sub {