home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Caldera Network Desktop 1.0
/
caldera-network-desktop-1.0.bin
/
images
/
ramdisk2-beta.img
/
usr
/
lib
/
perl
/
mouse
< prev
next >
Wrap
Text File
|
1995-12-04
|
2KB
|
92 lines
# mouse configuration -*-perl-*-
$mousetype = "";
$mouseport = "";
sub configure_mouse {
if ((! $force_config) && (-f "/bootdisk/defaults/xsetup")) {
require "/bootdisk/defaults/xsetup";
if (defined $mouseport) {
unlink("/dev/mouse");
symlink($mouseport, "/dev/mouse");
return 1;
}
}
if (! &rhs_menu("Mouse Configuration",
<<EOM
>
Which type of mouse do you have?
>
EOM
, 70, 11,
"microsoft-serial", "Microsoft compatible serial mouse",
"mousesystems-serial", "Mouse Systems serial mouse",
"mouseman-serial", "Logitech MouseMan",
"logitech-serial", "Logitech serial mouse",
"logitech-bus", "Logitech bus mouse",
"microsoft-bus", "Microsoft bus mouse",
"ps2-bus", "C&T 82C710 or PS/2 style (aux port)",
"mmseries-serial", "mmseries (?) serial mouse",
"mmhittab-serial", "Hitachi (?) serial (??) mouse",
"ati-bus", "ATI XL bus mouse",
"<none>", "No Mouse"
)) {
return 0;
}
$mousetype = $dialog_result;
$mouseport = "";
if ($mousetype eq "<none>") {
return 1;
} elsif ($mousetype eq "logitech-bus") {
$mouseport = "logibm";
} elsif ($mousetype eq "ati-bus") {
$mouseport = "atibm";
} elsif ($mousetype eq "microsoft-bus") {
$mouseport = "inportbm";
} elsif ($mousetype eq "ps2-bus") {
$mouseport = "psaux";
}
if ($mouseport eq "") {
if (! &rhs_menu("Mouse Configuration",
<<EOM
>
Which device (serial port) is your mouse connected to?
>
EOM
, 60, 4,
"/dev/ttyS0", "COM1: under MS-DOS",
"/dev/ttyS1", "COM2: under MS-DOS",
"/dev/ttyS3", "COM3: under MS-DOS",
"/dev/ttyS4", "COM4: under MS-DOS")) {
return 0;
}
$mouseport = $dialog_result;
$mouseport =~ s/.*\///;
}
# unlink("$fsmount/dev/mouse");
# symlink($mouseport, "$fsmount/dev/mouse");
open(FD, ">/tmp/mousetype");
print FD "$mousetype\n";
close(FD);
unlink("/dev/mouse");
symlink($mouseport, "/dev/mouse");
return 1;
}
sub finish_mouse {
unlink("$fsmount/dev/mouse");
symlink($mouseport, "$fsmount/dev/mouse");
}
########################
1;