# HG changeset patch # User Eric Joseph-Alexandre # Date 1230412635 -3600 # Node ID 8c110ce7ce64e439307d9181904ef9b1e361ed39 # Parent f9f8efc8b0a86160c5bdb3be253bc043d0cacd55 tazndis, don't modify system files in debug mode. diff -r f9f8efc8b0a8 -r 8c110ce7ce64 tazndis/stuff/tazndis --- a/tazndis/stuff/tazndis Sat Dec 27 22:07:42 2008 +0100 +++ b/tazndis/stuff/tazndis Sat Dec 27 22:17:15 2008 +0100 @@ -48,6 +48,7 @@ my $rcs_config = "/etc/rcS.conf"; my $net_config = "/etc/network.conf"; my $config_change = 1; +my $dbg = 1; # fixup list for parameters. @@ -69,7 +70,7 @@ # "-D" is for development/debugging only if ($ARGV[0] eq "-D") { - my $dbg = true; + my $dbg = 0; $dbg_file = "/tmp/ndiswrapper.dbg"; $confdir = "/tmp/ndiswrapper"; open(DBG, "> $dbg_file") or die "couldn't open $dbg_file: $!"; @@ -298,14 +299,17 @@ create_fuzzy_conf($driver_name); #Update LOAD_MODULES and load ndiswrapper. - set_rcs_config(); - load_ndiswrapper(); - - # Ask for WiFi at boot time. - print "Would you to start WiFi at boot time [y/N]? "; - chomp(my $answer = ); - if (lc($answer) eq "y") { - set_net_config(); + # Only if we are not in debug mode. + if (!$dbg) { + set_rcs_config(); + load_ndiswrapper(); + + # Ask for WiFi at boot time. + print "Would you to start WiFi at boot time [y/N]? "; + chomp(my $answer = ); + if (lc($answer) eq "y") { + set_net_config(); + } } return 0;