diff options
Diffstat (limited to 'perl-install/harddrake')
-rw-r--r-- | perl-install/harddrake/autoconf.pm | 27 | ||||
-rw-r--r-- | perl-install/harddrake/data.pm | 23 | ||||
-rw-r--r-- | perl-install/harddrake/v4l.pm | 12 |
3 files changed, 50 insertions, 12 deletions
diff --git a/perl-install/harddrake/autoconf.pm b/perl-install/harddrake/autoconf.pm new file mode 100644 index 000000000..985fecb4e --- /dev/null +++ b/perl-install/harddrake/autoconf.pm @@ -0,0 +1,27 @@ +package harddrake::autoconf; + +use common; +use any; + +sub xconf { + my ($o) = @_; + + log::l('automatic XFree configuration'); + + require Xconfig::default; + $o->{raw_X} = Xconfig::default::configure(keyboard::read()); + + require Xconfig::main; + require class_discard; + Xconfig::main::configure_everything_auto_install($o->{raw_X}, class_discard->new, {}, { allowFB => 1 }); + + modules::load_category('various/agpgart'); +} + +sub network_conf { + my ($o) = @_; + require network::network; + network::network::easy_dhcp($o->{netc}, $o->{intf}) and $o->{netcnx}{type} = 'lan'; +} + +1; diff --git a/perl-install/harddrake/data.pm b/perl-install/harddrake/data.pm index e1cea8be9..00f6c1d33 100644 --- a/perl-install/harddrake/data.pm +++ b/perl-install/harddrake/data.pm @@ -38,12 +38,17 @@ sub is_removable { $_[0] =~ /FLOPPY|ZIP|DVDROM|CDROM|BURNER/ } sub set_removable_configurator { my ($class, $device) = @_; - return "/usr/sbin/diskdrake --auto --removable=$device->{device}" if is_removable($class); + return "/usr/sbin/diskdrake --removable=$device->{device}" if is_removable($class); + } + +sub set_removable_auto_configurator { + my ($class, $device) = @_; + return "/usr/sbin/drakupdate_fstab --auto --no-flag --add $device->{device}" if is_removable($class); } sub set_removable_remover { my ($class, $device) = @_; - return "/usr/sbin/drakupdate_fstab --no-flag --del $device->{device}" if is_removable($class); + return "/usr/sbin/drakupdate_fstab --auto --no-flag --del $device->{device}" if is_removable($class); } @@ -75,7 +80,7 @@ our @tree = string => N("Disk"), icon => "harddisk.png", configurator => "$sbindir/diskdrake", - detector => \&detect_devices::hds, + detector => sub { f(detect_devices::hds()) }, checked_on_boot => 1, }, @@ -197,7 +202,7 @@ our @tree = #- protocol report are not accurate) so I'll need to verify against #- known drivers :-( require list_modules; - my @usbnet = (list_modules::category2modules('network/usb'), "nvnet"); # rought hack for nforce2's nvet + my @usbnet = (list_modules::category2modules('network/usb'), qw(forcedeth nvnet)); # rought hack for nforce2's nvnet f(grep { $_->{media_type} && $_->{media_type} =~ /^NETWORK/ @@ -367,7 +372,15 @@ our @tree = sub pciusb_id { my ($dev) = @_; - join(':', map { $dev->{$_} } qw(bus pci_bus pci_device vendor id subvendor subid description)); + my %alt = ( + bus => 'usb_bus', + description => 'usb_description', + id => 'usb_id', + pci_bus => 'usb_pci_bus', + pci_device => 'usb_pci_device', + vendor => 'usb_vendor', + ); + join(':', map { $dev->{$alt{$_}} || $dev->{$_} } qw(bus pci_bus pci_device vendor id subvendor subid description)); } diff --git a/perl-install/harddrake/v4l.pm b/perl-install/harddrake/v4l.pm index 9d4feaa14..e6e24eee1 100644 --- a/perl-install/harddrake/v4l.pm +++ b/perl-install/harddrake/v4l.pm @@ -302,8 +302,10 @@ sub config { $conf{gbuffers} = min($max_gbuffers, $conf{gbuffers}); $conf{card} = $default if !defined $cards_list{$conf{card}}; $conf{tuner} = -1 if !defined $tuners_lst{$conf{tuner}}; - $conf{pll} = -1 if !defined $pll_lst{$conf{tuner}}; - $conf{radio} = 0 if $conf{radio} !~ /(0|1)/; + if ($driver eq 'bttv') { + $conf{pll} = -1 if !defined $pll_lst{$conf{tuner}}; + $conf{radio} = 0 if $conf{radio} !~ /(0|1)/; + } if ($in->ask_from("BTTV configuration", N("For most modern TV cards, the bttv module of the GNU/Linux kernel just auto-detect the rights parameters. @@ -319,11 +321,7 @@ If your card is misdetected, you can force the right tuner and card types here. )) { $conf{card} = $cards_list{$conf{card}}; - - my $options = - 'radio=' . ($conf{radio} ? 1 : 0) . ' ' . - join(' ', map { if_($conf{$_} ne -1, "$_=$conf{$_}") } qw(card pll tuner gbuffers)); - if ($options) { + if (my $options = join(' ', if_($driver eq 'bttv', 'radio=' . ($conf{radio} ? 1 : 0)), map { if_($conf{$_} ne -1, "$_=$conf{$_}") } qw(card pll tuner gbuffers))) { log::l(qq([harddrake::v4l] set "$options" options for $driver)); # log::explanations("modified file /etc/modules.conf ($options)") if $::isStandalone; modules::set_options($driver, $options); |