From eb24230a5f96c7ad3d1d1e551c4fc0f3bcc1970f Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Mon, 15 Dec 2008 10:40:13 +0100 Subject: be smarter, propose rollback instead of disallowing --- src/core/procedures/interactive | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'src/core/procedures/interactive') diff --git a/src/core/procedures/interactive b/src/core/procedures/interactive index 1d5f1fc..6ee7023 100644 --- a/src/core/procedures/interactive +++ b/src/core/procedures/interactive @@ -154,21 +154,16 @@ worker_prepare_disks() case $ANSWER_OPTION in "1") + [ "$BLOCK_ROLLBACK_USELESS" = "0" ] && ask_yesno "You should probably rollback your last changes first, otherwise this will probably fail. Go back to menu to do rollback?" && NEXTITEM=4 && break; interactive_autoprepare && NEXTITEM=5 && ret=0 && DISK_CONFIG_TYPE=auto;; #TODO: for some reason. if this completes $?=0, next item will be 1 :/ "2") - if [ "$DISK_CONFIG_TYPE" = "auto" ]; then - notify "You have already prepared your filesystems with Auto-prepare" #TODO: allow user to do this anyway. he can change his mind. - else - interactive_partition && ret=1 && NEXTITEM=3 && DISK_CONFIG_TYPE=manual - fi + [ "$BLOCK_ROLLBACK_USELESS" = "0" ] && ask_yesno "You should probably rollback your last changes first, otherwise this will probably fail. Go back to menu to do rollback?" && NEXTITEM=4 && break; + interactive_partition && ret=1 && NEXTITEM=3 && DISK_CONFIG_TYPE=manual ;; "3") + [ "$BLOCK_ROLLBACK_USELESS" = "0" ] && ask_yesno "You should probably rollback your last changes first, otherwise this will probably fail. Go back to menu to do rollback?" && NEXTITEM=4 && break; PARTFINISH="" - if [ "$DISK_CONFIG_TYPE" = "auto" ]; then - notify "You have already prepared your filesystems with Auto-prepare" #TODO: allow user to do this anyway. he can change his mind. - else - interactive_filesystems && ret=0 && NEXTITEM=5 && DISK_CONFIG_TYPE=manual - fi + interactive_filesystems && ret=0 && NEXTITEM=5 && DISK_CONFIG_TYPE=manual ;; "4") if [ "$BLOCK_ROLLBACK_USELESS" = "1" ] -- cgit v1.2.3-54-g00ecf