diff options
author | Guillaume Cottenceau <gc@mandriva.com> | 2001-08-13 19:06:50 +0000 |
---|---|---|
committer | Guillaume Cottenceau <gc@mandriva.com> | 2001-08-13 19:06:50 +0000 |
commit | 17b65ec06df7108085989f2e0398e1b834cd0358 (patch) | |
tree | 6c4a056dfeac594066fd7d41c621d390fedd3d17 /perl-install/install_steps_auto_install.pm | |
parent | 0fc25337f6b7397a892d6724cb6dc3886d6f01f8 (diff) | |
download | drakx-17b65ec06df7108085989f2e0398e1b834cd0358.tar drakx-17b65ec06df7108085989f2e0398e1b834cd0358.tar.gz drakx-17b65ec06df7108085989f2e0398e1b834cd0358.tar.bz2 drakx-17b65ec06df7108085989f2e0398e1b834cd0358.tar.xz drakx-17b65ec06df7108085989f2e0398e1b834cd0358.zip |
initial revision for drakautoinst
- put %installSteps in a separate package (steps.pm) (for drakxtools)
- use additional fields {auto} and {noauto}, by step, to ease interactive auto install and oem stuff
- in install2.pm, perform each step either from the interactive class or from install_steps, according to the {auto} flag
- id, tell each step to not try to be automatic if {noauto}
- in the install, have auto install bootdisk created in install_any so we can always write a bootdisk (from install_steps) for further use from drakautoinst in standalone
- interactive version of install_steps_auto_install is now inheriting from the interactive class, so we can click on a previous automatic step and have it interactively during an interactive auto install
Diffstat (limited to 'perl-install/install_steps_auto_install.pm')
-rw-r--r-- | perl-install/install_steps_auto_install.pm | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/perl-install/install_steps_auto_install.pm b/perl-install/install_steps_auto_install.pm index 4e48dc8a5..a7870240d 100644 --- a/perl-install/install_steps_auto_install.pm +++ b/perl-install/install_steps_auto_install.pm @@ -23,31 +23,22 @@ sub new { # Handle legacy options $o->{interactive} ||= 'gtk' if $graphical || !is_empty_array_ref($o->{interactiveSteps}); $o->{interactiveSteps} ||= [ @graphical_steps ]; - push @{$o->{interactiveSteps}}, qw(enteringStep formatMountPartitions beforeInstallPackages installPackages); + push @{$o->{interactiveSteps}}, qw(formatPartitions installPackages); if ($o->{interactive}) { - push @ISA, "interactive_$o->{interactive}"; - my $interactiveClass = "install_steps_$o->{interactive}"; require"$interactiveClass.pm"; #- no space to skip perl2fcalls - #- remove the empty wait_message - undef *wait_message; - - foreach my $f (@{$o->{interactiveSteps}}) { - foreach my $pkg ($interactiveClass, 'install_steps_interactive') { - if ($::{$pkg . "::"}{$f}) { - log::l("install_steps_auto_install: adding function ", $pkg, "::", $f); - - no strict 'refs'; - *{"install_steps_auto_install::$f"} = sub { - local @ISA = ($interactiveClass, @ISA); - &{$::{$pkg . "::"}{$f}}; - }; - last; - } - } - } + @ISA = ($interactiveClass, @ISA); + + #- remove our non-interactive stuff + eval "undef *$_" foreach qw(configureNetwork enteringStep ask_warn wait_message errorInStep installPackages); + + my $f = $o->{steps}{first}; + do { + member($f, @{$o->{interactiveSteps}}) ? $o->{steps}{$f}{noauto} = 1 : $o->{steps}{$f}{auto} = 1; + } while ($f = $o->{steps}{$f}{next}); + goto &{$::{$interactiveClass . "::"}{new}}; } else { (bless {}, ref $type || $type)->SUPER::new($o); @@ -69,6 +60,7 @@ sub enteringStep { sub ask_warn { log::l(ref $_[1] ? join " ", @{$_[1]} : $_[1]); } + sub wait_message {} sub errorInStep { |