summaryrefslogtreecommitdiffstats
path: root/perl-install/install2.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-08-13 19:49:27 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-08-13 19:49:27 +0000
commit30bd557eb1cdb81ef2bac4d435714b1b9e985ff5 (patch)
treee1a37dc7954a9b1924510039033af97de84eda69 /perl-install/install2.pm
parent99d1d3f6512c77f34b863e3b0e1ce1a4ebccc072 (diff)
downloaddrakx-backup-do-not-use-30bd557eb1cdb81ef2bac4d435714b1b9e985ff5.tar
drakx-backup-do-not-use-30bd557eb1cdb81ef2bac4d435714b1b9e985ff5.tar.gz
drakx-backup-do-not-use-30bd557eb1cdb81ef2bac4d435714b1b9e985ff5.tar.bz2
drakx-backup-do-not-use-30bd557eb1cdb81ef2bac4d435714b1b9e985ff5.tar.xz
drakx-backup-do-not-use-30bd557eb1cdb81ef2bac4d435714b1b9e985ff5.zip
auto_inst enhancements
Diffstat (limited to 'perl-install/install2.pm')
-rw-r--r--perl-install/install2.pm23
1 files changed, 12 insertions, 11 deletions
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index e838db001..5b7bd7805 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -76,8 +76,8 @@ $o = $::o = {
sub installStepsCall {
my ($o, $auto, $fun, @args) = @_;
- eval($auto ? "install_steps::$fun".'($o, @args)' : '$o->'."$fun".'(@args)');
- #- TODO check $@ (when the method doesn't exist for example) ? I fail to do that
+ $fun = "install_steps::$fun" if $auto;
+ $o->$fun(@args);
}
#-######################################################################################
@@ -167,8 +167,8 @@ sub formatPartitions {
my ($clicked, $ent_number, $auto) = @_;
$o->{steps}{choosePackages}{done} = 0;
- installStepsCall($o, $auto, 'choosePartitionsToFormat', $o->{fstab}) unless $o->{isUpgrade};
- installStepsCall($o, $auto, 'formatMountPartitions', $o->{fstab}) unless $::testing;
+ installStepsCall($o, $auto, 'choosePartitionsToFormat', $o->{fstab}) if !$o->{isUpgrade};
+ installStepsCall($o, $auto, 'formatMountPartitions', $o->{fstab}) if !$::testing;
mkdir "$o->{prefix}/$_", 0755 foreach
qw(dev etc etc/profile.d etc/rpm etc/sysconfig etc/sysconfig/console
@@ -328,12 +328,13 @@ sub exitInstall {
#-######################################################################################
sub main {
$SIG{__DIE__} = sub { chomp(my $err = $_[0]); log::l("warning: $err") };
- $SIG{SEGV} = sub { my $msg = "segmentation fault: seems like memory is missing as the install crashes"; print "$msg\n"; log::l($msg);
- $o->ask_warn('', $msg);
- setVirtual(1);
- require install_steps_auto_install;
- install_steps_auto_install::errorInStep();
- };
+ $SIG{SEGV} = sub {
+ my $msg = "segmentation fault: seems like memory is missing as the install crashes"; print "$msg\n"; log::l($msg);
+ $o->ask_warn('', $msg);
+ setVirtual(1);
+ require install_steps_auto_install;
+ install_steps_auto_install_non_interactive::errorInStep ();
+ };
$ENV{PERL_BADLANG} = 1;
umask 022;
@@ -454,7 +455,7 @@ sub main {
undef $::auto_install;
} else {
print "Error using auto_install\n$@\n";
- install_steps_auto_install::errorInStep();
+ install_steps_auto_install_non_interactive::errorInStep ();
}
} else {
log::l("auto install config file loaded successfully");