summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-09-05 13:59:44 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-09-05 13:59:44 +0000
commitdb6d38f52ab7043babff21a8772c5cb3f481dd37 (patch)
tree5cdbcf9f7818729e81449322c089679a78b69d1e /perl-install
parentb2dcc1f05939631e7583740a36f3c41c87235639 (diff)
downloaddrakx-backup-do-not-use-db6d38f52ab7043babff21a8772c5cb3f481dd37.tar
drakx-backup-do-not-use-db6d38f52ab7043babff21a8772c5cb3f481dd37.tar.gz
drakx-backup-do-not-use-db6d38f52ab7043babff21a8772c5cb3f481dd37.tar.bz2
drakx-backup-do-not-use-db6d38f52ab7043babff21a8772c5cb3f481dd37.tar.xz
drakx-backup-do-not-use-db6d38f52ab7043babff21a8772c5cb3f481dd37.zip
no_comment
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/detect_devices.pm9
-rw-r--r--perl-install/modules.pm7
2 files changed, 9 insertions, 7 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index 47220af91..6330f0ea2 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -129,7 +129,7 @@ sub getDAC960() {
@idi;
}
-sub net2module {
+sub net2module() {
my @modules = map { quotemeta first(split) } cat_("/proc/modules");
my $modules = join '|', @modules;
my $net = join '|', @netdevices;
@@ -164,10 +164,7 @@ sub tryOpen($) {
local *F;
sysopen F, devices::make($_[0]), c::O_NONBLOCK() and \*F;
}
-
sub syslog {
- my $file = "/var/log/dmesg";
- -r $file or $file = "/tmp/syslog";
- my @l = cat_($file);
- @l ? @l : `dmesg`;
+ -r "/tmp/syslog" and return map { /<\d+>(.*)/ } cat_("/tmp/syslog");
+ `dmesg`
}
diff --git a/perl-install/modules.pm b/perl-install/modules.pm
index 594e07f9a..2117c580c 100644
--- a/perl-install/modules.pm
+++ b/perl-install/modules.pm
@@ -327,7 +327,12 @@ sub read_conf($;$) {
sub write_conf {
my ($file) = @_;
- my (undef, %written) = read_conf($file);
+ my %written = read_conf($file);
+
+ my %net = detect_devices::net2module();
+ while (my ($k, $v) = each %net) {
+ $conf{$k}{alias} ||= $v;
+ }
local *F;
open F, ">> $file" or die("cannot write module config file $file: $!\n");