summaryrefslogtreecommitdiffstats
path: root/perl-install/install_steps.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-08-25 09:47:06 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-08-25 09:47:06 +0000
commit9b8dddbc720899a7872d82e39405997ab6949df4 (patch)
treee294bf4db32549a4592ce398b694d4a9cd389006 /perl-install/install_steps.pm
parent9062c92ba51a7170424f825c60e5ff5ec46c85dd (diff)
downloaddrakx-9b8dddbc720899a7872d82e39405997ab6949df4.tar
drakx-9b8dddbc720899a7872d82e39405997ab6949df4.tar.gz
drakx-9b8dddbc720899a7872d82e39405997ab6949df4.tar.bz2
drakx-9b8dddbc720899a7872d82e39405997ab6949df4.tar.xz
drakx-9b8dddbc720899a7872d82e39405997ab6949df4.zip
no_comment
Diffstat (limited to 'perl-install/install_steps.pm')
-rw-r--r--perl-install/install_steps.pm22
1 files changed, 15 insertions, 7 deletions
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index a42cb57bd..af02ae1d6 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -69,7 +69,10 @@ sub leavingStep($$) {
}
while (my $f = shift @{$o->{steps}{$step}{toBeDone} || []}) {
- &$f();
+ eval { &$f() };
+ $o->ask_warn(_("Error"), [
+_("An error occured, i don't know how to handle it nicely,
+so continue at your own risk :("), $@ ]) if $@;
}
}
@@ -118,6 +121,13 @@ sub choosePackages($$$) {
my ($o, $packages, $compss) = @_;
}
+sub beforeInstallPackages {
+ my ($o) = @_;
+
+ network::add2hosts("$o->{prefix}/etc/hosts", "localhost.localdomain", "127.0.0.1");
+ pkgs::init_db($o->{prefix}, $o->{isUpgrade});
+}
+
sub installPackages($$) {
my ($o, $packages) = @_;
my $toInstall = [ grep { $_->{selected} && !$_->{installed} } values %$packages ];
@@ -140,15 +150,13 @@ sub mouseConfig($) {
sub configureNetwork($) {
my ($o) = @_;
my $etc = "$o->{prefix}/etc";
-
- # all information is in {intf}, but don't let network be aware of this :)
#
# rc = checkNetConfig(&$o->{intf}, &$o->{netc}, &$o->{intfFinal},
# &$o->{netcFinal}, &$o->{driversLoaded}, $o->{direction});
- network::write_conf("$etc/sysconfig/network", $o->{intf});
- network::write_interface_conf("$etc/sysconfig/network-scripts/ifcfg-$o->{intf}{DEVICE}", $o->{intf});
- network::write_resolv_conf("$etc/resolv.conf", $o->{intf});
- network::add2hosts("$etc/hosts", $o->{intf}{IPADDR}, $o->{intf}{HOSTNAME});
+ network::write_conf("$etc/sysconfig/network", $o->{netc});
+ network::write_resolv_conf("$etc/resolv.conf", $o->{netc});
+ network::write_interface_conf("$etc/sysconfig/network-scripts/ifcfg-$_->{DEVICE}", $_) foreach @{$o->{intf}};
+ network::add2hosts("$etc/hosts", $o->{netc}{HOSTNAME}, map { $_->{IPADDR} } @{$o->{intf}});
# syscall_('sethostname', $hostname, length $hostname) or warn "sethostname failed: $!";
#res_init(); # reinit the resolver so DNS changes take affect
}