scripts: Refactor collect script

Create a new function to collect all data display function calls in the
data collection script.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
This commit is contained in:
James O. D. Hunt 2019-03-19 15:28:14 +00:00
parent 925122a411
commit 4f34a54777

View File

@ -672,6 +672,19 @@ read_osbuilder_file()
cat "$file"
}
show_details()
{
show_meta
show_runtime
show_runtime_configs
show_throttler_details
show_image_details
show_initrd_details
show_log_details
show_container_mgr_details
show_package_versions
}
main()
{
args=$(getopt \
@ -711,15 +724,7 @@ main()
[ $(id -u) -eq 0 ] || die "Need to run as root"
[ -n "$runtime" ] || die "cannot find runtime '$runtime_name'"
show_meta
show_runtime
show_runtime_configs
show_throttler_details
show_image_details
show_initrd_details
show_log_details
show_container_mgr_details
show_package_versions
show_details
}
main "$@"