summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamien Chaumette <dchaumette@mandriva.com>2003-09-08 14:54:48 +0000
committerDamien Chaumette <dchaumette@mandriva.com>2003-09-08 14:54:48 +0000
commitec3798f880b10ab8b9bc4a5708649a6791e505a2 (patch)
treea3e4b068ce79b2b4388f51eea125266783156bea
parent0f88f5713171dac3a88c72b7c9e543948a78afd6 (diff)
downloaddrakx-ec3798f880b10ab8b9bc4a5708649a6791e505a2.tar
drakx-ec3798f880b10ab8b9bc4a5708649a6791e505a2.tar.gz
drakx-ec3798f880b10ab8b9bc4a5708649a6791e505a2.tar.bz2
drakx-ec3798f880b10ab8b9bc4a5708649a6791e505a2.tar.xz
drakx-ec3798f880b10ab8b9bc4a5708649a6791e505a2.zip
- fix/use explanations
- fix #5307 (firmware)
-rw-r--r--perl-install/network/adsl.pm5
-rw-r--r--perl-install/network/isdn.pm2
-rw-r--r--perl-install/network/netconnect.pm6
-rw-r--r--perl-install/network/network.pm18
-rw-r--r--perl-install/network/nfs.pm2
5 files changed, 20 insertions, 13 deletions
diff --git a/perl-install/network/adsl.pm b/perl-install/network/adsl.pm
index a576ccef8..2cb691fa9 100644
--- a/perl-install/network/adsl.pm
+++ b/perl-install/network/adsl.pm
@@ -127,11 +127,12 @@ sub load_firmware_floppy {
my $_b = before_leaving { fs::umount("/mnt") };
if (-e "/mnt/$file") {
- cp_af("/mnt/$file $destination");
+ cp_af("/mnt/$file", $destination);
} else { $failed ||= N("Firmware copy failed, file %s not found", $file) }
eval { $in->ask_warn('', $failed || N("Firmware copy succeeded")) }; $in->exit if $@ =~ /wizcancel/;
- $failed and log::l($failed) && return;
+ log::explanations($failed || "Firmware copy $file in $destination succeeded");
+ $failed and return;
1;
}
diff --git a/perl-install/network/isdn.pm b/perl-install/network/isdn.pm
index 0b4449781..4605963cc 100644
--- a/perl-install/network/isdn.pm
+++ b/perl-install/network/isdn.pm
@@ -220,7 +220,7 @@ If you have a PCMCIA card, you have to know the \"irq\" and \"io\" of your card.
sub isdn_detect {
my ($isdn, $netc) = @_;
if ($isdn->{id}) {
- log::l("found isdn card : $isdn->{description}; vendor : $isdn->{vendor}; id : $isdn->{id}; driver : $isdn->{driver}\n");
+ log::explanations("found isdn card : $isdn->{description}; vendor : $isdn->{vendor}; id : $isdn->{id}; driver : $isdn->{driver}\n");
$isdn->{description} =~ s/\|/ -- /;
isdn_detect_step_0:
diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm
index 14f30a45f..ceaf1373f 100644
--- a/perl-install/network/netconnect.pm
+++ b/perl-install/network/netconnect.pm
@@ -285,23 +285,27 @@ name=$netcnx->{PROFILE}
sub set_profile {
my ($netcnx) = @_;
system("/sbin/set-netprofile $netcnx->{PROFILE}");
+ log::explanations("current profile is $netcnx->{PROFILE}");
}
sub save_profile {
my ($netcnx) = @_;
system("/sbin/save-netprofile $netcnx->{PROFILE}");
+ log::explanations("saved $netcnx->{PROFILE} profile");
}
sub del_profile {
- my ($_netcnx, $profile) = @_;
+ my ($profile) = @_;
return if !$profile || $profile eq "default";
rm_rf("$::prefix/etc/netprofile/profiles/$profile");
+ log::explanations("deleted profile $profile");
}
sub add_profile {
my ($netcnx, $profile) = @_;
return if !$profile || $profile eq "default" || member($profile, get_profiles());
system("/sbin/clone-netprofile $netcnx->{PROFILE} $profile");
+ log::explanations("created $profile profile");
}
sub get_profiles() {
diff --git a/perl-install/network/network.pm b/perl-install/network/network.pm
index 4e721d0a0..24a256855 100644
--- a/perl-install/network/network.pm
+++ b/perl-install/network/network.pm
@@ -25,7 +25,6 @@ sub read_conf {
+{ getVarsFromSh($file) };
}
-
sub read_resolv_conf_raw {
my ($file) = @_;
$file ||= "$::prefix/etc/resolv.conf";
@@ -147,7 +146,7 @@ sub write_resolv_conf {
#-res_init(); # reinit the resolver so DNS changes take affect
1;
} else {
- log::l("neither domain name nor dns server are configured");
+ log::explanations("neither domain name nor dns server are configured");
0;
}
}
@@ -175,6 +174,7 @@ sub write_interface_conf {
$intf->{BOOTPROTO} =~ s/dhcp.*/dhcp/;
setVarsInSh($file, $intf, qw(DEVICE BOOTPROTO IPADDR NETMASK NETWORK BROADCAST ONBOOT HWADDR MII_NOT_SUPPORTED), if_($intf->{wireless_eth}, qw(WIRELESS_MODE WIRELESS_ESSID WIRELESS_NWID WIRELESS_FREQ WIRELESS_SENS WIRELESS_RATE WIRELESS_ENC_KEY WIRELESS_RTS WIRELESS_FRAG WIRELESS_IWCONFIG WIRELESS_IWSPY WIRELESS_IWPRIV)), if_($intf->{BOOTPROTO} eq "dhcp", qw(DHCP_HOSTNAME NEEDHOSTNAME)));
+ log::explanations("written $intf->{DEVICE} interface configuration in $file");
}
sub add2hosts {
@@ -186,7 +186,7 @@ sub add2hosts {
my $sub_hostname = $hostname =~ /(.*?)\./ ? " $1" : '';
$l{$_} = "\t\t$hostname$sub_hostname" foreach grep { $_ } @ips;
- log::l("writing host information to $file");
+ log::explanations("writing host information to $file");
output($file, map { "$_$l{$_}\n" } keys %l);
}
@@ -199,9 +199,9 @@ sub guessHostname {
write_resolv_conf("$prefix/etc/resolv.conf", $netc);
- my $name = gethostbyaddr(Socket::inet_aton($intf->{IPADDR}), Socket::AF_INET()) or log::l("reverse name lookup failed"), return 0;
+ my $name = gethostbyaddr(Socket::inet_aton($intf->{IPADDR}), Socket::AF_INET()) or log::explanations("reverse name lookup failed"), return 0;
- log::l("reverse name lookup worked");
+ log::explanations("reverse name lookup worked");
add2hash($netc, { HOSTNAME => $name });
1;
@@ -214,14 +214,16 @@ sub addDefaultRoute {
sub sethostname {
my ($netc) = @_;
- syscall_("sethostname", $netc->{HOSTNAME}, length $netc->{HOSTNAME}) or log::l("sethostname failed: $!");
+ my $text;
+ syscall_("sethostname", $netc->{HOSTNAME}, length $netc->{HOSTNAME}) ? ($text="set sethostname to $netc->{HOSTNAME}") : ($text="sethostname failed: $!");
+ log::explanations($text);
}
sub resolv($) {
my ($name) = @_;
is_ip($name) and return $name;
my $a = join(".", unpack "C4", (gethostbyname $name)[4]);
- #-log::l("resolved $name in $a");
+ #-log::explanations("resolved $name in $a");
$a;
}
@@ -510,7 +512,7 @@ sub easy_dhcp {
#- only for a single network card
(any { $_->[0] eq 'eth0' } @all_cards) && (every { $_->[0] ne 'eth1' } @all_cards) or return;
- log::l("easy_dhcp: found eth0");
+ log::explanations("easy_dhcp: found eth0");
network::ethernet::conf_network_card_backend($netc, $intf, 'dhcp', 'eth0');
diff --git a/perl-install/network/nfs.pm b/perl-install/network/nfs.pm
index d257f5346..e564d6fc7 100644
--- a/perl-install/network/nfs.pm
+++ b/perl-install/network/nfs.pm
@@ -43,7 +43,7 @@ sub find_servers {
my @servers;
local $_;
while (<$F>) {
- my ($ip, $name) = /(\S+)\s+(\S+)/ or log::l("bad line in rpcinfo output"), next;
+ my ($ip, $name) = /(\S+)\s+(\S+)/ or log::explanations("bad line in rpcinfo output"), next;
$name =~ s/\Q.$domain//;
$name =~ s/\.$//;
push @servers, { ip => $ip, if_($name ne '(unknown)', name => $name) };