Changeset 716


Ignore:
Timestamp:
06/01/06 15:41:15 (7 years ago)
Author:
mglb1
Message:
  • Rearrange startup process to speed things up when starting the wizard
  • Ensure that traffic policy data is always set in the preferences file for the firewall to read
  • Load the firewall in the background so that it doesn't slow things down
File:
1 edited

Legend:

Unmodified
Added
Removed
  • ccsd/private/modules/ccs_monitor_rurallink.py

    r714 r716  
    733733    # Restart DHCP and Reload Firewall  
    734734    log_command("/etc/init.d/dhcp3-server restart 2>&1") 
    735     log_command("/etc/init.d/firewall start 2>&1") 
     735    log_command("/etc/init.d/firewall start & 2>&1") 
    736736     
    737737    return True 
     
    782782    # Restart DHCP and Reload Firewall  
    783783    log_command("/etc/init.d/dhcp3-server restart 2>&1") 
    784     log_command("/etc/init.d/firewall start 2>&1") 
     784    log_command("/etc/init.d/firewall start & 2>&1") 
    785785     
    786786    return True 
     
    844844    # Restart DHCP and Reload Firewall  
    845845    log_command("/etc/init.d/dhcp3-server restart 2>&1") 
    846     log_command("/etc/init.d/firewall start 2>&1") 
     846    log_command("/etc/init.d/firewall start & 2>&1") 
    847847 
    848848    return True 
     
    25362536        # Reload interfaces to pick up any new configuration 
    25372537        log_command("/etc/init.d/networking restart 2>&1") 
    2538          
    2539         # Reload the firewall 
    2540         log_command("/etc/init.d/firewall start 2>&1") 
    2541          
    2542         # Check services are running 
    2543         checkDHCPServer() 
    2544          
    2545         # Initialise routes for the clients 
    2546         initialiseClientRoutes() 
    25472538     
    25482539    # Check if we know the master device to talk to 
     
    25612552        # Master node can get its own IP when it needs it... 
    25622553        rl_masterip = None 
     2554         
    25632555        # Retrieve the ISP we're connecting to 
    25642556        rl_isptype = pref_get("rurallink", "isptype", monitor_prefs, ISP_BCL) 
     
    25912583            rl_trafficusers = {} 
    25922584            return 
    2593      
     2585         
     2586        # Ensure that default traffic management policies are set in the 
     2587        # preferences file for the firewall to use 
     2588        ap0_policy = pref_get("traffic", "ap0_policy", monitor_prefs, None) 
     2589        int_policy = pref_get("traffic", "internal_policy", monitor_prefs, \ 
     2590                None) 
     2591        if ap0_policy is None: 
     2592            ap0_policy = DEFAULT_AP0_POLICY 
     2593            pref_set("traffic", "ap0_policy", ap0_policy, monitor_prefs) 
     2594        if int_policy is None: 
     2595            int_policy = DEFAULT_INTERNAL_POLICY 
     2596            pref_set("traffic", "internal_policy", int_policy, monitor_prefs) 
     2597 
    25942598        # Initialise the counters 
    25952599        for username,user in rl_trafficusers.items(): 
     
    26002604        httpd = AsyncHTTPServer(('', 81), CaptivePortalHandler) 
    26012605        log_info("Captive Portal Initialised. Traffic management in place.") 
    2602      
     2606      
     2607    # Reload the firewall 
     2608    log_command("/etc/init.d/firewall start & 2>&1") 
     2609 
    26032610    # Make sure DNS is correctly setup 
    26042611    updateDNS() 
     2612     
     2613    if rl_wizardrun: 
     2614        # Check services are running 
     2615        checkDHCPServer() 
     2616         
     2617        # Initialise routes for the clients 
     2618        initialiseClientRoutes() 
    26052619 
    26062620@catchEvent("statusMapRequested") 
     
    30043018             
    30053019            # Reload the firewall 
    3006             log_command("/etc/init.d/firewall start 2>&1") 
     3020            log_command("/etc/init.d/firewall start & 2>&1") 
    30073021             
    30083022            # Check services are running 
Note: See TracChangeset for help on using the changeset viewer.