Changeset 586

Show
Ignore:
Timestamp:
12/18/10 23:19:46 (17 months ago)
Author:
JulioCP
Message:

nightwing-wa: Added to nw_conf the configuration related to Changeset 567.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/nightwing-wa/nightwing/usr/bin/nw_conf

    r585 r586  
    360360esac 
    361361} 
     362 
     363menu_address() 
     364{ 
     365read VAL 
     366case $VAL in 
     367                y|Y) 
     368                        echo "Enter the new default address (empty value to disable this feature): " 
     369                        read DEFIP 
     370                        uci set nwnode.dnsmasq.address=$DEFIP 
     371                        uci commit nwnode                                                                                     
     372                        if [ $DEFIP ]; then 
     373                            echo "Default address chaged to: "$DEFIP 
     374                        else 
     375                            echo "This feature has been disabled." 
     376                        fi 
     377                        sleep 2 
     378                        ;; 
     379                n|N) 
     380                        echo $NOCHANGED_MSG 
     381                        sleep 2 
     382                        ;; 
     383                *) 
     384                        echo "$VAL is not a valid option" 
     385                        echo "[y/n]: " 
     386                        menu_address 
     387                        ;; 
     388        esac  
     389} 
     390 
    362391clear 
    363392echo -e "\033[1m **************** Basic Config *****************\033[0m" 
     
    368397echo -e "\033[1m d.\033[0m Change Wireless mode" 
    369398echo -e "\033[1m e.\033[0m Change Traffic Shaping Configuration" 
    370 echo -e "\033[1m f.\033[0m Back to main menu" 
    371 echo -n "Select an option [a - f]: " 
     399echo -e "\033[1m f.\033[0m Set default IP to return on all querys" 
     400echo -e "\033[1m g.\033[0m Back to main menu" 
     401echo -n "Select an option [a - g]: " 
    372402read val2 
    373403       case $val2 in 
     
    397427                e|E)  
    398428                        menu_ts 
     429                        echo $YESNO_MSG 
    399430                        menu_2 
    400431                        ;; 
    401432                f|F) 
     433                        ADDRESS=$(uci get nwnode.dnsmasq.address) 
     434                         
     435                        if [ $ADDRESS ]; then                                                                           
     436                                echo "The current default IP to return on any query (only in client mode) is: "$ADDRESS 
     437                                echo $YESNO_MSG                                                                         
     438                        else                                                                                            
     439                                echo "This feature is currently disabled, do you wan't to enable it? [y/n]"             
     440                        fi   
     441                         
     442                        menu_address 
     443                        menu_2 
     444                        ;; 
     445                g|G) 
    402446                        ;; 
    403447                *)