summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-09-10 06:57:01 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-09-10 06:57:01 +0000
commit8ca2917bf496b04ee10ae19888652e4a3098fe25 (patch)
treeca84e86ad66af84f26901ff1116c3dba39ec7c12 /perl-install
parent3a113f64e78637a847f9f4c98ac82824c444b138 (diff)
downloaddrakx-8ca2917bf496b04ee10ae19888652e4a3098fe25.tar
drakx-8ca2917bf496b04ee10ae19888652e4a3098fe25.tar.gz
drakx-8ca2917bf496b04ee10ae19888652e4a3098fe25.tar.bz2
drakx-8ca2917bf496b04ee10ae19888652e4a3098fe25.tar.xz
drakx-8ca2917bf496b04ee10ae19888652e4a3098fe25.zip
autoconfigure mice on bootstrapping
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/harddrake/autoconf.pm8
-rw-r--r--perl-install/harddrake/data.pm1
-rwxr-xr-xperl-install/standalone/service_harddrake9
3 files changed, 12 insertions, 6 deletions
diff --git a/perl-install/harddrake/autoconf.pm b/perl-install/harddrake/autoconf.pm
index 054d8879b..e2e48b27c 100644
--- a/perl-install/harddrake/autoconf.pm
+++ b/perl-install/harddrake/autoconf.pm
@@ -24,4 +24,12 @@ sub network_conf {
network::network::easy_dhcp($obj->{modules_conf}, $obj->{netc}, $obj->{intf}) and $obj->{netcnx}{type} = 'lan';
}
+sub mouse_conf {
+ my ($modules_conf) = @_;
+ log::explanations("Autoconfiguring mouse since we switched between 2.4.x and 2.6.x kernels");
+ require do_pkgs;
+ require mouse;
+ mouse::write_conf(do_pkgs_standalone->new, $modules_conf, mouse::detect($modules_conf), 1);
+}
+
1;
diff --git a/perl-install/harddrake/data.pm b/perl-install/harddrake/data.pm
index dd3fe705d..7b2153eba 100644
--- a/perl-install/harddrake/data.pm
+++ b/perl-install/harddrake/data.pm
@@ -272,6 +272,7 @@ our @tree =
mouse::detect($modules_conf);
},
checked_on_boot => 1,
+ automatic => 1,
},
{
diff --git a/perl-install/standalone/service_harddrake b/perl-install/standalone/service_harddrake
index a1bf40f16..890c7b446 100755
--- a/perl-install/standalone/service_harddrake
+++ b/perl-install/standalone/service_harddrake
@@ -30,12 +30,7 @@ my $prev_kernel = { getVarsFromSh("$hw_sysconfdir/kernel") }->{KERNEL};
my $curr_kernel = c::kernel_version();
$curr_kernel =~ s/(^\d+\.\d+).*/$1/;
setVarsInSh("$hw_sysconfdir/kernel", { KERNEL => $curr_kernel });
-if ($curr_kernel ne $prev_kernel) {
- log::explanations("Autoconfiguring mouse since we switched between 2.4.x and 2.6.x kernels");
- require do_pkgs;
- require mouse;
- mouse::write_conf(do_pkgs_standalone->new, $modules_conf, mouse::detect($modules_conf), 1);
-}
+harddrake::autoconf::mouse_conf($modules_conf) if $curr_kernel ne $prev_kernel;
if (find { $_->{driver} =~ /Card:NVIDIA/ } detect_devices::probeall()) {
if (find { -e join('', "/lib/modules/", c::kernel_version(), "/kernel/drivers/$_") } map { ("video/$_", "char/$_") } qw(NVdriver nvidia.o nvidia.o.gz nvidia.ko nvidia.ko.gz)) {
@@ -133,6 +128,8 @@ foreach my $hw_class (@harddrake::data::tree) {
require harddrake::autoconf;
harddrake::autoconf::xconf($modules_conf, {});
next;
+ } elsif ($Ident eq "MOUSE") {
+ harddrake::autoconf::mouse_conf($modules_conf);
}
next if $is_globetrotter && !$hw_class->{automatic};