diff options
author | Francois Pons <fpons@mandriva.com> | 2002-07-15 12:25:09 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2002-07-15 12:25:09 +0000 |
commit | 7119403aad0d11cf9e3f4fcc9c898b25269a4974 (patch) | |
tree | bdbee1f41ea793589ce05c82ac9358b63dda9b62 | |
parent | 3a4d4afe6fd0f3f0620bd4d6a0b34f79e660a950 (diff) | |
download | drakx-7119403aad0d11cf9e3f4fcc9c898b25269a4974.tar drakx-7119403aad0d11cf9e3f4fcc9c898b25269a4974.tar.gz drakx-7119403aad0d11cf9e3f4fcc9c898b25269a4974.tar.bz2 drakx-7119403aad0d11cf9e3f4fcc9c898b25269a4974.tar.xz drakx-7119403aad0d11cf9e3f4fcc9c898b25269a4974.zip |
added patch from imz@altlinux.ru
-rwxr-xr-x | perl-install/standalone/mousedrake | 20 |
1 files changed, 20 insertions, 0 deletions
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}; |