summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
authordamien <damien@mandriva.com>2000-11-24 14:55:31 +0000
committerdamien <damien@mandriva.com>2000-11-24 14:55:31 +0000
commit7ee987e60dcc07fd2fc30040ef288e10d724acd0 (patch)
tree5c116beee3d695e38fe85ee14b94ea209d951cf7 /perl-install/standalone
parent05a818f3dd3295a90d9457576c60ae3cce1f0545 (diff)
downloaddrakx-backup-do-not-use-7ee987e60dcc07fd2fc30040ef288e10d724acd0.tar
drakx-backup-do-not-use-7ee987e60dcc07fd2fc30040ef288e10d724acd0.tar.gz
drakx-backup-do-not-use-7ee987e60dcc07fd2fc30040ef288e10d724acd0.tar.bz2
drakx-backup-do-not-use-7ee987e60dcc07fd2fc30040ef288e10d724acd0.tar.xz
drakx-backup-do-not-use-7ee987e60dcc07fd2fc30040ef288e10d724acd0.zip
splited
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-xperl-install/standalone/mousedrake33
1 files changed, 3 insertions, 30 deletions
diff --git a/perl-install/standalone/mousedrake b/perl-install/standalone/mousedrake
index 5736f79ee..397a1f12a 100755
--- a/perl-install/standalone/mousedrake
+++ b/perl-install/standalone/mousedrake
@@ -6,6 +6,7 @@ use common qw(:common :system);
use interactive;
use mouse;
use c;
+require 'dumpvar.pl';
local $_ = join '', @ARGV;
@@ -33,7 +34,6 @@ if (!$mouse || !$::auto) {
eval { modules::load($c->[1], "serial_usb") };
}
}
-
$mouse->{XEMU3} = 'yes' if $mouse->{nbuttons} < 3 && (!$::noauto || $in->ask_yesorno('', _("Emulate third button?"), 1));
$o->{mouse}{device} =
@@ -42,34 +42,7 @@ $o->{mouse}{device} =
\&mouse::serial_port2text,
[ mouse::serial_ports ]) if $mouse->{type} eq 'serial';
-mouse::write('', $mouse);
-modules::write_conf('') if $mouse->{device} eq "usbmouse" && !$::testing;
-
-my $f = "/etc/X11/XF86Config";
-my $g = "/etc/X11/XF86Config-4";
-
-my @zaxis = (
- $mouse->{nbuttons} > 3 ? [ "ZAxisMapping", "4 5" ] : (),
- $mouse->{nbuttons} > 5 ? [ "ZAxisMapping", "6 7" ] : (),
- $mouse->{nbuttons} < 3 ? ([ "Emulate3Buttons" ], [ "Emulate3Timeout", "50" ]) : ()
-);
-
-my $zaxis = join('', map { qq(\n $_->[0]) . ($_->[1] && qq( $_->[1])) } @zaxis);
-substInFile {
- if (/^Section\s+"Pointer"/ .. /^EndSection/) {
- $_ = '' if /(ZAxisMapping|Emulate3)/; #- remove existing line
- s|^(\s*Protocol\s+).*|$1"$mouse->{XMOUSETYPE}"|;
- s|^(\s*Device\s+).*|$1"/dev/mouse"$zaxis|;
- }
-} $f if -e $f && !$::testing;
-
-$zaxis = join('', map { qq(\n Option "$_->[0]") . ($_->[1] && qq( "$_->[1]")) } @zaxis);
-substInFile {
- if (/Identifier\s+"Mouse1"/ .. /^EndSection/) {
- $_ = '' if /(ZAxisMapping|Emulate3)/; #- remove existing line
- s|^(\s*Option\s+"Protocol"\s+).*|$1"$mouse->{XMOUSETYPE}"|;
- s|^(\s*Option\s+"Device"\s+).*|$1"/dev/mouse"$zaxis|;
- }
-} $g if -e $g && !$::testing;
+dumpValue(\$mouse);
+mouse::write_conf($mouse);
$in->exit(0);