From 5ad4993ef08462f365c3f679c525f6ef7bda6549 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 23 May 2012 18:26:42 +0000 Subject: (init_brltty) split it out of main() --- perl-install/install/install2.pm | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'perl-install/install/install2.pm') diff --git a/perl-install/install/install2.pm b/perl-install/install/install2.pm index 37a70eed6..43086895c 100644 --- a/perl-install/install/install2.pm +++ b/perl-install/install/install2.pm @@ -334,6 +334,13 @@ sub init_local_install { $o->{mouse} = mouse::fullname2mouse('Universal|Any PS/2 & USB mice'); } +sub init_brltty() { + symlink "/tmp/stage2/$_", $_ foreach "/etc/brltty"; + devices::make($_) foreach $o->{brltty}{device} ? $o->{brltty}{device} : qw(ttyS0 ttyS1); + devices::make("vcsa"); + run_program::run("brltty"); +} + sub sig_segv_handler() { my $msg = "segmentation fault: install crashed (maybe memory is missing?)\n" . backtrace(); log::l("$msg\n"); @@ -556,12 +563,7 @@ sub main { harddrake::sound::configure_sound_slots($o->{modules_conf}); #- need to be after oo-izing $o - if ($o->{brltty}) { - symlink "/tmp/stage2/$_", $_ foreach "/etc/brltty"; - devices::make($_) foreach $o->{brltty}{device} ? $o->{brltty}{device} : qw(ttyS0 ttyS1); - devices::make("vcsa"); - run_program::run("brltty"); - } + init_brltty() if $o->{brltty}; devices::make('tty') if $o->{interactive} eq "curses"; -- cgit v1.2.1