wok diff tazndis/stuff/tazndis @ rev 1942

tazndis, don't modify system files in debug mode.
author Eric Joseph-Alexandre <erjo@slitaz.org>
date Sat Dec 27 22:17:15 2008 +0100 (2008-12-27)
parents f9f8efc8b0a8
children 5117bf553562
line diff
     1.1 --- a/tazndis/stuff/tazndis	Sat Dec 27 22:07:42 2008 +0100
     1.2 +++ b/tazndis/stuff/tazndis	Sat Dec 27 22:17:15 2008 +0100
     1.3 @@ -48,6 +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  
     1.9  
    1.10  # fixup list for parameters.
    1.11 @@ -69,7 +70,7 @@
    1.12  
    1.13  # "-D" is for development/debugging only
    1.14  if ($ARGV[0] eq "-D") {
    1.15 -	my $dbg = true;
    1.16 +	my $dbg = 0;
    1.17      $dbg_file = "/tmp/ndiswrapper.dbg";
    1.18      $confdir = "/tmp/ndiswrapper";
    1.19  	open(DBG, "> $dbg_file") or die "couldn't open $dbg_file: $!";
    1.20 @@ -298,14 +299,17 @@
    1.21      create_fuzzy_conf($driver_name);
    1.22      
    1.23      #Update LOAD_MODULES and load ndiswrapper.
    1.24 -    set_rcs_config();
    1.25 -    load_ndiswrapper();
    1.26 -    
    1.27 -    # Ask for WiFi at boot time.
    1.28 -    print "Would you to start WiFi at boot time [y/N]? ";
    1.29 -    chomp(my $answer = <STDIN>);
    1.30 -    if (lc($answer) eq "y") {
    1.31 -    	set_net_config();
    1.32 +    # Only if we are not in debug mode.
    1.33 +    if (!$dbg) {
    1.34 +    	set_rcs_config();
    1.35 +    	load_ndiswrapper();
    1.36 +	
    1.37 +		# Ask for WiFi at boot time.
    1.38 +       	print "Would you to start WiFi at boot time [y/N]? ";
    1.39 +    	chomp(my $answer = <STDIN>);
    1.40 +    	if (lc($answer) eq "y") {
    1.41 +    		set_net_config();
    1.42 +		}
    1.43  	}
    1.44      
    1.45      return 0;