diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-07-24 22:24:09 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-07-24 22:24:09 +0000 |
commit | 182c30de16f68cc373ae923dbe5af58c14442e16 (patch) | |
tree | 09f3b2b50563a04c7483ca967b54c1872dc742e3 | |
parent | a985eac214014664e2fe8a590378558cb5efcfa0 (diff) | |
download | pfsense-182c30de16f68cc373ae923dbe5af58c14442e16.zip pfsense-182c30de16f68cc373ae923dbe5af58c14442e16.tar.gz |
* Drop kick reboots bye bye
* Add reloat_interfaces()
* Add reload_all()
* Use reload_all() in wizard
-rw-r--r-- | etc/inc/pfsense-utils.inc | 91 | ||||
-rwxr-xr-x | usr/local/www/interfaces_assign.php | 6 | ||||
-rwxr-xr-x | usr/local/www/interfaces_vlan.php | 5 | ||||
-rw-r--r-- | usr/local/www/wizards/setup_wizard.xml | 51 |
4 files changed, 98 insertions, 55 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index c759003..cc5e31d 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -1005,4 +1005,93 @@ function strncpy(&$dst, $src, $length) { } } -?> +/****f* pfsense-utils/reload_interfaces + * NAME + * reload_interfaces - reload all interfaces + * INPUTS + * none + * RESULT + * none + ******/ +function reload_interfaces() { + /* set up LAN interface */ + interfaces_lan_configure(); + + /* set up WAN interface */ + interfaces_wan_configure(); + + /* set up Optional interfaces */ + interfaces_optional_configure(); + + /* bring up carp interfaces */ + interfaces_carp_bringup(); + + /* set up static routes */ + system_routing_configure(); + + /* enable routing */ + system_routing_enable(); +} + +/****f* pfsense-utils/reload_all + * NAME + * reload_all - reload all settings + * * INPUTS + * none + * RESULT + * none + ******/ +function reload_all() { + /* set up our timezone */ + system_timezone_configure(); + + /* set up our hostname */ + system_hostname_configure(); + + /* make hosts file */ + system_hosts_generate(); + + /* generate resolv.conf */ + system_resolvconf_generate(); + + /* set up LAN interface */ + interfaces_lan_configure(); + + /* set up WAN interface */ + interfaces_wan_configure(); + + /* set up Optional interfaces */ + interfaces_optional_configure(); + + /* bring up carp interfaces */ + interfaces_carp_bringup(); + + /* set up static routes */ + system_routing_configure(); + + /* enable routing */ + system_routing_enable(); + + /* ensure passwords are sync'd */ + system_password_configure(); + + /* start dnsmasq service */ + services_dnsmasq_configure(); + + /* start dyndns service */ + services_dyndns_configure(); + + /* start DHCP service */ + services_dhcpd_configure(); + + /* start the NTP client */ + system_ntp_configure(); + + /* start ftp proxy helpers if they are enabled */ + system_start_ftp_helpers(); + + /* reload the filter */ + filter_configure(); +} + +?>
\ No newline at end of file diff --git a/usr/local/www/interfaces_assign.php b/usr/local/www/interfaces_assign.php index 2f10b66..6a66325 100755 --- a/usr/local/www/interfaces_assign.php +++ b/usr/local/www/interfaces_assign.php @@ -112,7 +112,10 @@ if ($_POST) { } write_config(); - touch($d_sysrebootreqd_path); + + /* reload all interfaces configuration */ + reload_interfaces(); + } } @@ -186,7 +189,6 @@ include("head.inc"); <?php include("fbegin.inc"); ?> <p class="pgtitle"><?=$pgtitle?></p> <?php if ($input_errors) print_input_errors($input_errors); ?> -<?php if (file_exists($d_sysrebootreqd_path)) print_info_box(get_std_save_message(0)); ?> <form action="interfaces_assign.php" method="post" name="iform" id="iform"> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr><td class="tabnavtbl"> diff --git a/usr/local/www/interfaces_vlan.php b/usr/local/www/interfaces_vlan.php index cbfa9ca..9d130c9 100755 --- a/usr/local/www/interfaces_vlan.php +++ b/usr/local/www/interfaces_vlan.php @@ -78,7 +78,9 @@ if ($_GET['act'] == "del") { $config['interfaces']['opt' . $i]['if'] = renumber_vlan($config['interfaces']['opt' . $i]['if'], $_GET['id']); write_config(); - touch($d_sysrebootreqd_path); + + reload_interfaces(); + header("Location: interfaces_vlan.php"); exit; } @@ -94,7 +96,6 @@ include("head.inc"); <?php include("fbegin.inc"); ?> <p class="pgtitle"><?=$pgtitle?></p> <?php if ($input_errors) print_input_errors($input_errors); ?> -<?php if (file_exists($d_sysrebootreqd_path)) print_info_box(get_std_save_message(0)); ?> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr><td> <?php diff --git a/usr/local/www/wizards/setup_wizard.xml b/usr/local/www/wizards/setup_wizard.xml index 4ba6533..beb56fd 100644 --- a/usr/local/www/wizards/setup_wizard.xml +++ b/usr/local/www/wizards/setup_wizard.xml @@ -488,56 +488,7 @@ <description>A reload is now in progress. Please wait. <p> The system will automatically try to access $myurl in 120 seconds. <p> You can click on the icon above to access the site more quickly. <meta http-equiv="refresh" content="60; url=$myurl" ></description> <stepafterformdisplay> - /* set up our timezone */ - system_timezone_configure(); - - /* set up our hostname */ - system_hostname_configure(); - - /* make hosts file */ - system_hosts_generate(); - - /* generate resolv.conf */ - system_resolvconf_generate(); - - /* set up LAN interface */ - interfaces_lan_configure(); - - /* set up WAN interface */ - interfaces_wan_configure(); - - /* set up Optional interfaces */ - interfaces_optional_configure(); - - /* bring up carp interfaces */ - interfaces_carp_bringup(); - - /* set up static routes */ - system_routing_configure(); - - /* enable routing */ - system_routing_enable(); - - /* ensure passwords are sync'd */ - system_password_configure(); - - /* start dnsmasq service */ - services_dnsmasq_configure(); - - /* start dyndns service */ - services_dyndns_configure(); - - /* start DHCP service */ - services_dhcpd_configure(); - - /* start the NTP client */ - system_ntp_configure(); - - /* start ftp proxy helpers if they are enabled */ - system_start_ftp_helpers(); - - /* reload the filter */ - filter_configure(); + reload_all(); </stepafterformdisplay> </step> </pfsensewizard> |