From 7119403aad0d11cf9e3f4fcc9c898b25269a4974 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Mon, 15 Jul 2002 12:25:09 +0000 Subject: added patch from imz@altlinux.ru --- perl-install/standalone/mousedrake | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/perl-install/standalone/mousedrake b/perl-install/standalone/mousedrake index 64501a531..90cb8994c 100755 --- a/perl-install/standalone/mousedrake +++ b/perl-install/standalone/mousedrake @@ -31,6 +31,26 @@ my ($mouse) = mouse::detect() unless $::noauto; my $time_tag2; #- now try to merge $curr_env->{mouse} with $mouse. + +# Hack to read symlinks (when they are used in existing config): +# This prevents mousedrake from doing stupid things like +# ln -sf mouse /dev/mouse (this was done by me after it read +# an old XF86Config, not -4, and found "/dev/mouse" there). +# 2002 July 13, imz@altlinux.ru +if ( $curr_env->{mouse}{device} eq "mouse" ) { + $curr_env->{mouse}{device} = + ( readlink "$prefix/dev/mouse" + or ( log::l("reading $prefix/dev/mouse symlink failed"), + $mouse->{device} ) ); +} +if ( $curr_env->{mouse}{auxmouse}{device} eq "mouse1" ) { + $curr_env->{mouse}{auxmouse}{device} = + ( readlink "$prefix/dev/mouse1" + or ( log::l("reading $prefix/dev/mouse1 symlink failed"), + $mouse->{auxmouse}{device} ) ); +} +# End of the hack. + $mouse->{XMOUSETYPE} eq $curr_env->{mouse}{XMOUSETYPE} || $mouse->{XMOUSETYPE} eq 'PS/2' && ($curr_env->{mouse}{XMOUSETYPE} =~ m|PS/2| || $curr_env->{mouse}{auxmouse}{XMOUSETYPE} =~ m|PS/2|) and $mouse = $curr_env->{mouse}; -- cgit v1.2.1