diff options
author | Steven Rostedt <srostedt@redhat.com> | 2011-06-13 15:09:22 (GMT) |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2011-06-13 15:09:22 (GMT) |
commit | db05cfefce6e6120267974345599760b1d653439 (patch) | |
tree | 35e7229da79a4108e9aecd54b2d7e7b1b2c18172 | |
parent | 23715c3c9a31dd34c8c2f27086a9562e35da423b (diff) | |
download | linux-fsl-qoriq-db05cfefce6e6120267974345599760b1d653439.tar.xz |
ktest: Allow initrd processing without modules defined
When a config is set with CONFIG_MODULES=n, it does not mean that the
kernel does not need an initrd to boot. For systems that depend on LVM
and such, an initrd must run first.
If POST_INSTALL is defined, then run the post install regardless if
modules are needed or not.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rwxr-xr-x | tools/testing/ktest/ktest.pl | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index 83dcfaf..fb46e12 100755 --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl @@ -1031,6 +1031,16 @@ sub monitor { return 1; } +sub do_post_install { + + return if (!defined($post_install)); + + my $cp_post_install = $post_install; + $cp_post_install =~ s/\$KERNEL_VERSION/$version/g; + run_command "$cp_post_install" or + dodie "Failed to run post install"; +} + sub install { run_scp "$outputdir/$build_target", "$target_image" or @@ -1050,6 +1060,7 @@ sub install { close(IN); if (!$install_mods) { + do_post_install; doprint "No modules needed\n"; return; } @@ -1077,12 +1088,7 @@ sub install { run_ssh "rm -f /tmp/$modtar"; - return if (!defined($post_install)); - - my $cp_post_install = $post_install; - $cp_post_install =~ s/\$KERNEL_VERSION/$version/g; - run_command "$cp_post_install" or - dodie "Failed to run post install"; + do_post_install; } sub check_buildlog { |