From f9f1423df0fc6aea175ddb003922222c22af1dc8 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Thu, 10 Feb 2005 14:35:25 +0000 Subject: do not complain about no tv cards when there're but they do not require any configuration beyond loading proper module (#7443, #11270 and the like) --- perl-install/standalone/drakxtv | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/perl-install/standalone/drakxtv b/perl-install/standalone/drakxtv index 709c13309..ac199065d 100755 --- a/perl-install/standalone/drakxtv +++ b/perl-install/standalone/drakxtv @@ -115,9 +115,12 @@ sub scan4channels() { my @devices = detect_devices::getTVcards(); push @devices, { driver => 'bttv', description => 'dummy' } if $::testing && !@devices; -if (@devices) { +my ($devices, $devices_ok) = partition { detect_devices::isTVcard($_) } @devices; + +my $modules_conf; + +if (@devices = @$devices) { my $not_canceled = 1; - my $modules_conf; # TODO: That need some work for multiples TV cards each_index { if (($< == 0 || $::testing) && (grep { detect_devices::isTVcard($_) } @devices)) { @@ -130,7 +133,15 @@ if (@devices) { } scan4channels() if $not_canceled; } @devices -} else { +} + +if (@devices = @$devices_ok) { + require modules; + $modules_conf ||= modules::any_conf->read; + $modules_conf->write; +} + +if (!$devices && !$devices_ok) { $in->ask_warn(N("No TV Card detected!"), formatAlaTeX( #-PO: keep the double empty lines between sections, this is formatted a la LaTeX N("No TV Card has been detected on your machine. Please verify that a Linux-supported Video/TV Card is correctly plugged in. -- cgit v1.2.1