summaryrefslogtreecommitdiff
path: root/src/core/libs/lib-ui-interactive.sh
diff options
context:
space:
mode:
authorDieter Plaetinck <dieter@plaetinck.be>2008-12-14 18:27:19 +0100
committerDieter Plaetinck <dieter@plaetinck.be>2008-12-14 18:27:19 +0100
commit801b3d4a7f925e7b9ad63f795f7a7bdc92fd75a7 (patch)
tree6e3266792d5abb99d134a530e47750bbaf1208a2 /src/core/libs/lib-ui-interactive.sh
parent1b5b6ed697fdce45da8657bd580211f682f2bee8 (diff)
switch from dead-end 'try to be smart and clean environment first' approach to 'rollback in case of failures' system
Diffstat (limited to 'src/core/libs/lib-ui-interactive.sh')
-rw-r--r--src/core/libs/lib-ui-interactive.sh20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh
index f5df834..1ed844e 100644
--- a/src/core/libs/lib-ui-interactive.sh
+++ b/src/core/libs/lib-ui-interactive.sh
@@ -163,10 +163,20 @@ interactive_autoprepare()
process_disks || die_error "Something went wrong while partitioning"
- process_filesystems || die_error "Something went wrong while processing the filesystems"
- notify "Auto-prepare was successful"
- return 0
-
+ if ! process_filesystems
+ then
+ show_warning "Filesystem processing" "Something went wrong while processing the filesystems. Attempting rollback."
+ if rollback_filesystems
+ then
+ show_warning "Filesystem rollback" "Rollback succeeded. Please try to figure out what went wrong and try me again. If you found a bug in the installer, please report it."
+ return 1
+ else
+ die_error "Filesystem processing and rollback failed. Please try the installer again. If you found a bug in the installer, please report it."
+ fi
+ else
+ notify "Auto-prepare was successful"
+ return 0
+ fi
}
@@ -504,7 +514,7 @@ interactive_filesystems() {
process_filesystems && notify "Partitions were successfully created." && return 0
- show_warning "Filesystem processing" "Something went wrong while processing the filesystems"
+ ask_yesno "Seems like some stuff went wrong while processing the filesystems. do you want to rollback? (this cleans up the new mountpoints, filesystems, etc. not doing this can break the next run of the installer unless you clean it up yourself" yes && rollback_filesystems
return 1
}