summaryrefslogtreecommitdiffstats
path: root/move
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2003-10-30 18:31:17 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2003-10-30 18:31:17 +0000
commit5fe510a12e805ab1f850a9c105c983590d6ffa3c (patch)
tree5e1741947d551b9319e15afd0b91148e6d2759ff /move
parent84734197a30a0f3755b50850456cb15200bdc6fe (diff)
downloaddrakx-backup-do-not-use-5fe510a12e805ab1f850a9c105c983590d6ffa3c.tar
drakx-backup-do-not-use-5fe510a12e805ab1f850a9c105c983590d6ffa3c.tar.gz
drakx-backup-do-not-use-5fe510a12e805ab1f850a9c105c983590d6ffa3c.tar.bz2
drakx-backup-do-not-use-5fe510a12e805ab1f850a9c105c983590d6ffa3c.tar.xz
drakx-backup-do-not-use-5fe510a12e805ab1f850a9c105c983590d6ffa3c.zip
allow undone toBeDone things to be done
Diffstat (limited to 'move')
-rw-r--r--move/move.pm15
1 files changed, 14 insertions, 1 deletions
diff --git a/move/move.pm b/move/move.pm
index 4f79528d7..a8388fe9b 100644
--- a/move/move.pm
+++ b/move/move.pm
@@ -23,6 +23,7 @@ sub init {
mkdir_p "/etc/$_" foreach qw(X11);
touch '/etc/modules.conf';
symlinkf "/proc/mounts", "/etc/mtab";
+ mkdir_p $_ foreach qw(/etc/rpm /etc/sysconfig /etc/sysconfig/console/consoletrans /etc/sysconfig/console/consolefonts);
#- ro things
symlinkf "/image/etc/$_", "/etc/$_"
@@ -46,19 +47,31 @@ sub init {
modules::load_category('multimedia/sound');
$o->{steps}{startMove} = { reachable => 1, text => "Start Move" };
+ $o->{orderedSteps_orig} = $o->{orderedSteps};
$o->{orderedSteps} = [ qw(selectLanguage acceptLicense selectMouse selectKeyboard startMove) ];
member($_, @ALLOWED_LANGS) or delete $lang::langs{$_} foreach keys %lang::langs;
}
sub install2::startMove {
- my ($o) = @_;
+ my $o = $::o;
require install_any;
install_any::write_fstab($o);
modules::write_conf('');
detect_devices::install_addons('');
+ foreach my $step (@{$o->{orderedSteps_orig}}) {
+ next if member($step, @{$o->{orderedSteps}});
+ while (my $f = shift @{$o->{steps}{$step}{toBeDone} || []}) {
+ log::l("doing remaining toBeDone for undone step $step");
+ eval { &$f() };
+ $o->ask_warn(N("Error"), [
+N("An error occurred, but I don't know how to handle it nicely.
+Continue at your own risk."), formatError($@) ]) if $@;
+ }
+ }
+
$::WizardWindow->destroy;
require ugtk2;
my $root = ugtk2::gtkroot();