# HG changeset patch # User Eric Joseph-Alexandre # Date 1230505168 -3600 # Node ID 5117bf55356232d4640b660342a3f42afb0e19c5 # Parent 5555a96d536bfc86e6444aea8ef4951332bb1309 tazndis, fix load_ndiswrapper diff -r 5555a96d536b -r 5117bf553562 tazndis/stuff/CHANGELOG --- a/tazndis/stuff/CHANGELOG Sun Dec 28 22:35:52 2008 +0000 +++ b/tazndis/stuff/CHANGELOG Sun Dec 28 23:59:28 2008 +0100 @@ -1,3 +1,7 @@ +2008-12-28 Eric Jsoeph-Alexandre +* Fix load_ndiswrapper, don't load ndiswrapper if stell loaded. + + 2008-12-27 Eric Jsoeph-Alexandre * Add set_rcs_config, add ndiswrapper to LOAD_MODULES in /etc/rcS.conf. @@ -10,3 +14,4 @@ $rcs_config, set rcS.conf path. * Don't modify system file if we are in debug mode. + diff -r 5555a96d536b -r 5117bf553562 tazndis/stuff/tazndis --- a/tazndis/stuff/tazndis Sun Dec 28 22:35:52 2008 +0000 +++ b/tazndis/stuff/tazndis Sun Dec 28 23:59:28 2008 +0100 @@ -48,7 +48,7 @@ my $rcs_config = "/etc/rcS.conf"; my $net_config = "/etc/network.conf"; my $config_change = 1; -my $dbg = 1; +#my $dbg = 1; # fixup list for parameters. @@ -265,12 +265,15 @@ sub load_ndiswrapper { open (LSMOD, " lsmod |") or die "couldn't get loaded module list: $!"; - if(!/^ndiswrapper/){ + while() { + if(/^ndiswrapper/){$tmp = 1;} + } + if(!$tmp) { print "Loading ndiswrapper...\n"; `modprobe ndiswrapper`; } -} - +} + sub install { my $inf = shift; chomp($inf); @@ -363,7 +366,7 @@ my $name = shift; my $lines = get_section($name); if (!$lines) { - return; + return; } $parsed_sections{$name} = (); foreach my $line (@{$lines}) { @@ -476,7 +479,7 @@ printf CONF "sys_files|"; foreach my $file (@copyfiles) { - parse_copy_file($file); + parse_copy_file($file); } printf CONF "\n"; @@ -501,7 +504,7 @@ die "couldn't create file $confdir/$driver_name/$filename: $!"; foreach my $reg (@addregs) { - parse_registry($reg); + parse_registry($reg); } close(CONF); }