summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDieter Plaetinck <dieter@plaetinck.be>2010-12-29 18:47:48 +0100
committerDieter Plaetinck <dieter@plaetinck.be>2010-12-29 18:52:07 +0100
commit8b1fd87d3c942f00c1d62b687739e247224225ee (patch)
tree532eeabcf636c398d532e306e51401e1011bb35b
parentb07332d11f025cf51b34ee805d3a69a64170b257 (diff)
Show report at end of install in interactive procedure
* port show_report to interactive procedure * use msg_report worker as method to exit the installer (this is more in line with the other procedures)
-rw-r--r--doc/official_installation_guide_en6
-rw-r--r--src/core/procedures/interactive29
2 files changed, 29 insertions, 6 deletions
diff --git a/doc/official_installation_guide_en b/doc/official_installation_guide_en
index b2200ef..770d223 100644
--- a/doc/official_installation_guide_en
+++ b/doc/official_installation_guide_en
@@ -787,8 +787,10 @@ number suffix.
#### Exit Install
-Exit the Installer, remove the media you used for the installation, type
-reboot at the command line and cross your fingers!
+You will be shown a summary of the installation, listing the steps and whether
+they executed successfully or not.
+If all went well, exit the installer, type reboot at the command line, remove
+your installation media and cross your fingers!
### Automatic Installation Procedure
diff --git a/src/core/procedures/interactive b/src/core/procedures/interactive
index ebca22f..f3e3361 100644
--- a/src/core/procedures/interactive
+++ b/src/core/procedures/interactive
@@ -24,6 +24,9 @@ workertitles['package_list']='Select packages'
workertitles['install_packages']='Install packages'
workertitles['configure_system']='Configure system'
workertitles['install_bootloader']='Install bootloader'
+workertitles['msg_report']='Exit Install'
+
+menu_workers=(select_source set_editor set_clock prepare_disks package_list install_packages configure_system install_bootloader msg_report)
start_process ()
{
@@ -44,7 +47,6 @@ start_process ()
mainmenu()
{
- menu_workers=(select_source set_editor set_clock prepare_disks package_list install_packages configure_system install_bootloader)
menu=()
for i in ${!menu_workers[@]}
do
@@ -53,8 +55,6 @@ mainmenu()
title=${workertitles[$worker]}
menu+=($i "$title")
done
- let i+=1
- menu+=($i "Exit Install")
ask_option $default "MAIN MENU" '' required "${menu[@]}"
case $ANSWER_OPTION in
@@ -69,7 +69,7 @@ mainmenu()
check_depend worker select_source && execute worker install_packages && default=7 ;;
"7") check_depend worker install_packages && execute worker configure_system && default=8 ;;
"8") check_depend worker configure_system && execute worker install_bootloader && default=9 ;;
- "9") notify "If the install finished successfully, you can now type 'reboot' to restart the system." && stop_installer ;;
+ "9") execute worker msg_report ;;
*) execute worker abort_installer;;
esac
}
@@ -181,6 +181,27 @@ worker_auto_network ()
return 0
}
+# override show_report because this procedure does not use phases, but it's own menu
+show_report ()
+{
+ data="Execution Report:"
+ data="$data\n-----------------"
+ for w in ${menu_workers[@]}
+ do
+ [ "$w" = 'msg_report' ] && continue # this worker is the one calling show_report, we can't know our exitcode yet
+ title=${workertitles[$w]}
+ exit_var=exit_worker_$w
+ ret=${!exit_var}
+ [ "$ret" = "0" ] && data="$data\n > Worker $worker ($title): Sucess"
+ [ "$ret" = "0" ] || data="$data\n > Worker $worker ($title): Failed"
+ done
+ notify "$data\nIf the install finished successfully, you can type 'reboot' to restart the system." || return $?
+}
+
+worker_msg_report () {
+ show_report && stop_installer
+}
+
worker_abort_installer ()
{
ret=0