wok diff tazndis/stuff/tazndis @ rev 1950

tazndis, fix load_ndiswrapper
author Eric Joseph-Alexandre <erjo@slitaz.org>
date Sun Dec 28 23:59:28 2008 +0100 (2008-12-28)
parents 8c110ce7ce64
children 2a3f24eb3dfc
line diff
     1.1 --- a/tazndis/stuff/tazndis	Sat Dec 27 22:17:15 2008 +0100
     1.2 +++ b/tazndis/stuff/tazndis	Sun Dec 28 23:59:28 2008 +0100
     1.3 @@ -48,7 +48,7 @@
     1.4  my $rcs_config = "/etc/rcS.conf";
     1.5  my $net_config = "/etc/network.conf";
     1.6  my $config_change = 1;
     1.7 -my $dbg = 1;
     1.8 +#my $dbg = 1;
     1.9  
    1.10  
    1.11  # fixup list for parameters.
    1.12 @@ -265,12 +265,15 @@
    1.13  
    1.14  sub load_ndiswrapper {
    1.15  	open (LSMOD, " lsmod |") or die "couldn't get loaded module list: $!";
    1.16 -	if(!/^ndiswrapper/){
    1.17 +	while(<LSMOD>) {
    1.18 +		if(/^ndiswrapper/){$tmp = 1;}
    1.19 +	}
    1.20 +	if(!$tmp) {
    1.21  		print "Loading ndiswrapper...\n";
    1.22  		`modprobe ndiswrapper`;
    1.23  	}
    1.24 -}
    1.25 -
    1.26 +}	
    1.27 +	
    1.28  sub install {
    1.29      my $inf = shift;
    1.30      chomp($inf);
    1.31 @@ -363,7 +366,7 @@
    1.32      my $name = shift;
    1.33      my $lines = get_section($name);
    1.34      if (!$lines) {
    1.35 -	return;
    1.36 +		return;
    1.37      }
    1.38      $parsed_sections{$name} = ();
    1.39      foreach my $line (@{$lines}) {
    1.40 @@ -476,7 +479,7 @@
    1.41  
    1.42      printf CONF "sys_files|";
    1.43      foreach my $file (@copyfiles) {
    1.44 -	parse_copy_file($file);
    1.45 +		parse_copy_file($file);
    1.46      }
    1.47      printf CONF "\n";
    1.48  
    1.49 @@ -501,7 +504,7 @@
    1.50        die "couldn't create file $confdir/$driver_name/$filename: $!";
    1.51  
    1.52      foreach my $reg (@addregs) {
    1.53 -	parse_registry($reg);
    1.54 +		parse_registry($reg);
    1.55      }
    1.56      close(CONF);
    1.57  }