summaryrefslogtreecommitdiffstats
path: root/perl-install/any.pm
diff options
context:
space:
mode:
authordamien <damien@mandriva.com>2000-12-14 07:23:55 +0000
committerdamien <damien@mandriva.com>2000-12-14 07:23:55 +0000
commitce769349f19b71801fc7cf0fc49fea08d4bf4164 (patch)
treed779f0705e1c61d5672bdd75535865b3e5e3a277 /perl-install/any.pm
parentc49b69446a45419f9a2f008ede0f228bf6ce760e (diff)
downloaddrakx-backup-do-not-use-ce769349f19b71801fc7cf0fc49fea08d4bf4164.tar
drakx-backup-do-not-use-ce769349f19b71801fc7cf0fc49fea08d4bf4164.tar.gz
drakx-backup-do-not-use-ce769349f19b71801fc7cf0fc49fea08d4bf4164.tar.bz2
drakx-backup-do-not-use-ce769349f19b71801fc7cf0fc49fea08d4bf4164.tar.xz
drakx-backup-do-not-use-ce769349f19b71801fc7cf0fc49fea08d4bf4164.zip
corrected typo.
Diffstat (limited to 'perl-install/any.pm')
-rw-r--r--perl-install/any.pm39
1 files changed, 31 insertions, 8 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 68d7ae8e9..be1ff5e28 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -249,6 +249,18 @@ sub setAutologin {
{ USER => $user, AUTOLOGIN => bool2yesno($user), EXEC => "/usr/X11R6/bin/startx" });
}
+sub rotate_log {
+ my ($f) = @_;
+ if (-e $f) {
+ my $i = 1;
+ for (; -e "$f$i" || -e "$f$i.gz"; $i++) {}
+ rename $f, "$f$i";
+ }
+}
+sub rotate_logs {
+ my ($prefix) = @_;
+ rotate_log("$prefix/root/$_") foreach qw(ddebug.log install.log);
+}
sub writeandclean_ldsoconf {
my ($prefix) = @_;
@@ -474,20 +486,13 @@ sub miscellaneousNetwork {
setVarsInCsh("$prefix/etc/profile.d/proxy.csh", $::o->{miscellaneous}, qw(http_proxy ftp_proxy));
}
-sub load_thiskind {
- my ($in, $type) = @_;
- my $w;
- modules::load_thiskind($type, sub { $w = wait_load_module($in, $type, @_) });
-}
-
sub setup_thiskind {
my ($in, $type, $auto, $at_least_one) = @_;
return if arch() eq "ppc";
+ my @l=setup_thiskind_backend ($type, $auto, $at_least_one, sub { my $w = wait_load_module($in, $type, @_) } );
- my @l;
if (!$::noauto) {
- @l = load_thiskind($in, $type);
if (my @err = grep { $_ } map { $_->{error} } @l) {
$in->ask_warn('', join("\n", @err));
}
@@ -514,6 +519,24 @@ sub setup_thiskind {
}
}
+# setup_thiskind_backend : setup the kind of hardware
+# input :
+# $type : typeof hardware to setup
+# $auto : automatic behaviour
+# $at_least_one :
+# output:
+# @l : list of loaded
+sub setup_thiskind_backend {
+ my ($type, $auto, $at_least_one, $wait_function) = @_;
+ #- for example $wait_function=sub { $w = wait_load_module($in, $type, @_) }
+
+ my @l;
+ if (!$::noauto) {
+ @l = modules::load_thiskind($type, $wait_function );
+ return @l if $auto && (@l || !$at_least_one);
+ }
+}
+
sub wait_load_module {
my ($in, $type, $text, $module) = @_;
#-PO: the first %s is the card type (scsi, network, sound,...)