summaryrefslogtreecommitdiffstats
path: root/perl-install/install2.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-02-04 14:25:50 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-02-04 14:25:50 +0000
commitb48b3efc4f0ca8eafc4d65987f9948f5509c980d (patch)
tree36b5c93fd71cc6d8ce5db8bf90b0ac3d36222bbc /perl-install/install2.pm
parent2f4a483b72dae82331dbebb907386dccbd93baf1 (diff)
downloaddrakx-b48b3efc4f0ca8eafc4d65987f9948f5509c980d.tar
drakx-b48b3efc4f0ca8eafc4d65987f9948f5509c980d.tar.gz
drakx-b48b3efc4f0ca8eafc4d65987f9948f5509c980d.tar.bz2
drakx-b48b3efc4f0ca8eafc4d65987f9948f5509c980d.tar.xz
drakx-b48b3efc4f0ca8eafc4d65987f9948f5509c980d.zip
brltty support
Diffstat (limited to 'perl-install/install2.pm')
-rw-r--r--perl-install/install2.pm30
1 files changed, 30 insertions, 0 deletions
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index 8f93705dd..2ae492a9f 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -11,6 +11,7 @@ use steps;
use common;
use install_any qw(:all);
use install_steps;
+use install_any;
use lang;
use keyboard;
use mouse;
@@ -484,6 +485,15 @@ sub main {
log::l("switching to newt install cuz not enough memory");
$o->{interactive} = "newt";
}
+
+ if (my ($s) = cat_("/proc/cmdline") =~ /brltty=(\S*)/) {
+ my ($driver, $device, $table) = split(',', $s);
+ $table = "text.$table.tbl" if $table !~ /\.tbl$/;
+ log::l("brltty option $driver $device $table");
+ $o->{brltty} = { driver => $driver, device => $device, table => $table };
+ $o->{interactive} = 'newt';
+ }
+
# perl_checker: require install_steps_gtk
# perl_checker: require install_steps_newt
# perl_checker: require install_steps_stdio
@@ -506,6 +516,26 @@ sub main {
#- needed very early for install_steps_gtk
eval { $o->{mouse} = mouse::detect() } if !$o->{nomouseprobe} && !$o->{mouse} && !$::testing;
+ #- need to be after oo-izing $o
+ if ($o->{brltty}) {
+ symlink "/tmp/stage2/$_", $_ foreach "/etc/brltty";
+ if (common::usingRamdisk()) {
+ install_any::remove_unused(0);
+ mkdir '/tmp/stage2/etc/brltty';
+ mkdir '/lib/brltty';
+ install_any::getAndSaveFile("/etc/brltty/$o->{brltty}{table}", "/tmp/stage2/etc/brltty/$o->{brltty}{table}") if $o->{brltty}{table};
+ install_any::getAndSaveFile("/lib/brltty/libbrlttyb$o->{brltty}{driver}.so") or do {
+ warn("Braille driver $o->{brltty}{driver} for BRLTTY was not found.\n",
+ "Press ENTER to continue.\n");
+ <STDIN>;
+ };
+ install_any::getAndSaveFile("/usr/bin/brltty");
+ chmod 0755, "/usr/bin/brltty";
+ }
+ devices::make("vcsa");
+ run_program::run("brltty");
+ }
+
$o->{lang} = lang::set($o->{lang}) if $o->{lang} ne 'en_US'; #- mainly for defcfg
start_i810fb();