]> xenbits.xensource.com Git - people/aperard/osstest.git/commitdiff
TestSupport: host_installcmdline_core, along with ks_installcmdline_core
authorAnthony PERARD <anthony.perard@citrix.com>
Fri, 8 Jun 2018 14:56:02 +0000 (15:56 +0100)
committerAnthony PERARD <anthony.perard@citrix.com>
Thu, 12 Jul 2018 15:49:19 +0000 (16:49 +0100)
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Osstest/RedHat.pm
Osstest/TestSupport.pm
ts-host-install

index 96b9bd00a6ac64766ee6290906f88bbbac7d2041..60531fdf96e6e9e73737d16493e14befd431a23d 100644 (file)
@@ -29,6 +29,7 @@ BEGIN {
     @ISA         = qw(Exporter);
     @EXPORT      = qw(kickstart_create_guest
                       kickstart_create
+                      ks_installcmdline_core
                       );
     %EXPORT_TAGS = ( );
 
@@ -346,4 +347,26 @@ sub ks_installer_path ($) {
         .'-'.$ho->{RedhatRelease};
 }
 
+sub ks_installcmdline_core ($$;@) {
+    my ($tho, $ks_url, %xopts) = @_;
+
+    my @cl= qw(debug);
+    if ($tho->{RedhatRelease} >= 7) {
+        push @cl, "inst.text";
+        push @cl, "inst.ks=$ks_url";
+
+        # FIXME: CentOS installer forward syslog only via TCP, osstest listen on UPD.
+        push @cl, "inst.syslog=$r{syslog_server}"
+            if ($r{syslog_server});
+    } else {
+        # CentOS 6
+        push @cl, qw(text ksdevice=bootif);
+        push @cl, "ks=$ks_url";
+        push @cl, "syslog=$r{syslog_server}"
+            if ($r{syslog_server});
+    }
+
+    return @cl;
+}
+
 1;
index 666192cfb990658e1db61b510746b4ff7b1dbed9..970525c395b84ed58baefd191f11b750c862f38f 100644 (file)
@@ -143,6 +143,7 @@ BEGIN {
                       is_host_redhat_derived
                       host_install_recipe_create
                       host_installer_path
+                      host_installcmdline_core
                       );
     %EXPORT_TAGS = ( );
 
@@ -2955,4 +2956,15 @@ sub host_installer_path ($) {
     }
 }
 
+sub host_installcmdline_core ($) {
+    my ($ho) = @_;
+    if ($ho->{OS} eq "debian") {
+        return \&Osstest::Debian::di_installcmdline_core;
+    } elsif (is_host_redhat_derived($ho)) {
+        return \&Osstest::RedHat::ks_installcmdline_core;
+    } else {
+        die "Unknown OS $ho->{OS}";
+    }
+}
+
 1;
index d8dd9502ebd1b94712aea19f025e564f500f10e3..ae43f3d4e0bc5b2ba49c609f2bcb2c5fa788a97a 100755 (executable)
@@ -164,7 +164,7 @@ sub setup_netboot_firstboot($) {
     my $d_i= host_installer_path($ho)->($ho);
     
     my @dicmdline= qw(vga=normal);
-    push @dicmdline, di_installcmdline_core($ho, $ps_url, %xopts);
+    push @dicmdline, host_installcmdline_core($ho)->($ho, $ps_url, %xopts);
 
     my $src_initrd= "$d_i/initrd.gz";
     my @initrds= "$ho->{Tftp}{Path}/$src_initrd";