diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2004-03-20 09:40:46 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2004-03-20 09:40:46 +0000 |
commit | 4b0524610edb00bf9b0fdec4a73ac86914e1b330 (patch) | |
tree | e10bc2dc196e817be9ba57e0e8f8b946715ca3ee /perl-install/standalone | |
parent | 8ddc2493ea4b96c5708edc63b297d1a679d9044f (diff) | |
download | drakx-4b0524610edb00bf9b0fdec4a73ac86914e1b330.tar drakx-4b0524610edb00bf9b0fdec4a73ac86914e1b330.tar.gz drakx-4b0524610edb00bf9b0fdec4a73ac86914e1b330.tar.bz2 drakx-4b0524610edb00bf9b0fdec4a73ac86914e1b330.tar.xz drakx-4b0524610edb00bf9b0fdec4a73ac86914e1b330.zip |
fix #3193:
- use right device
- offer to set the user to config
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-x | perl-install/standalone/drakxtv | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/perl-install/standalone/drakxtv b/perl-install/standalone/drakxtv index 45773de9c..29e0b628a 100755 --- a/perl-install/standalone/drakxtv +++ b/perl-install/standalone/drakxtv @@ -79,12 +79,15 @@ sub scan4channels() { } # default to pal since most people use that $norm ||= "PAL"; - log::l("[drakxtv] guess country=>$locale->{country}, norm=>$norm, area=>$ftable_id"); + log::l("[drakxtv] guess country=>$locale->{country}, norm=>$norm, area=>$ ftable_id"); + my %users = map { $_->[6] || $_->[0] => $_->[7] } grep { $_->[2] == 0 || 500 <= $_->[2] } list_passwd(); + my $user; if ($in->ask_from("TVdrake", N("Please,\ntype in your tv norm and country"), [ { label => N("TV norm:"), val => \$norm, list => [ "NTSC", "NTSC-JP", "PAL", "PAL-M", "PAL-N", "PAL-NC", "SECAM" ], type => 'combo' }, { label => N("Area:"), val => \$ftable_id, list => [keys %freqtables], format => sub { $freqtables{$_[0]} }, sort => 1 }, + { label => N("User :"), val => \$user, list => [ keys %users ], sort => 1 }, ] )) { my $_wait = $in->wait_message(N("Please wait"), @@ -94,12 +97,12 @@ sub scan4channels() { $ftable_id = "france -a " if $ftable_id eq -1; # Note that this'll be broken if/when we implement interactive::qt my $use_X = $in->isa('interactive::gtk') && -x "/usr/X11R6/bin/xvt"; - my $home = $ENV{HOME}; + my $home = $users{$user}; #ENV{HOME}; my $is_bttv_loaded = cat_("/proc/modules"); # workaround non loaded bttv run_program::run('/sbin/modprobe', 'bttv') if $< == 0 && $is_bttv_loaded !~ /bttv/; my $i = system(($use_X ? "xvt -T '" . N("Scanning for TV channels") . " ...' -e " : "") . - "scantv -n $norm -f $ftable_id -o $home/.xawtv" . + "scantv -n $norm -C /dev/v4l/vbi$::i -c /dev/v4l/video$::i -f $ftable_id -o $home/.xawtv" . ($use_X ? "" : " &>$home/tmp/scantv.log;")); if ($i) { $in->ask_warn(N("There was an error while scanning for TV channels"), @@ -118,7 +121,7 @@ if (@devices) { my $not_canceled = 1; my $configured; # TODO: That need some work for multiples TV cards - foreach (@devices) { + each_index { if (($< == 0 || $::testing) && (grep { detect_devices::isTVcard($_) } @devices)) { require harddrake::v4l; require modules; @@ -128,7 +131,7 @@ if (@devices) { modules::write_conf(); } scan4channels() if $not_canceled; - } + } @devices } else { $in->ask_warn(N("No TV Card detected!"), formatAlaTeX( N("No TV Card has been detected on your machine. Please verify that a Linux-supported Video/TV Card is correctly plugged in. |