From 3a8cb984c2bbf56c37a0b48c3d370e9488763123 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 23 May 2012 18:27:03 +0000 Subject: (pre_init_brltty) split it out of main() --- perl-install/install/install2.pm | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/perl-install/install/install2.pm b/perl-install/install/install2.pm index 0be9e23ca..c4a2c112e 100644 --- a/perl-install/install/install2.pm +++ b/perl-install/install/install2.pm @@ -334,6 +334,17 @@ sub init_local_install { $o->{mouse} = mouse::fullname2mouse('Universal|Any PS/2 & USB mice'); } +sub pre_init_brltty() { + 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} = 'curses'; + $o->{nomouseprobe} = 1; + } +} + sub init_brltty() { symlink "/tmp/stage2/$_", $_ foreach "/etc/brltty"; devices::make($_) foreach $o->{brltty}{device} ? $o->{brltty}{device} : qw(ttyS0 ttyS1); @@ -588,14 +599,7 @@ sub main { $o->{interactive} = "curses"; } - 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} = 'curses'; - $o->{nomouseprobe} = 1; - } + pre_init_brltty(); # perl_checker: require install::steps_gtk # perl_checker: require install::steps_curses -- cgit v1.2.1