Revision 182c30de
Added by Scott Ullrich about 20 years ago
- Drop kick reboots bye bye
- Add reloat_interfaces()
- Add reload_all()
- Use reload_all() in wizard
etc/inc/pfsense-utils.inc | ||
---|---|---|
1005 | 1005 |
} |
1006 | 1006 |
} |
1007 | 1007 |
|
1008 |
?> |
|
1008 |
/****f* pfsense-utils/reload_interfaces |
|
1009 |
* NAME |
|
1010 |
* reload_interfaces - reload all interfaces |
|
1011 |
* INPUTS |
|
1012 |
* none |
|
1013 |
* RESULT |
|
1014 |
* none |
|
1015 |
******/ |
|
1016 |
function reload_interfaces() { |
|
1017 |
/* set up LAN interface */ |
|
1018 |
interfaces_lan_configure(); |
|
1019 |
|
|
1020 |
/* set up WAN interface */ |
|
1021 |
interfaces_wan_configure(); |
|
1022 |
|
|
1023 |
/* set up Optional interfaces */ |
|
1024 |
interfaces_optional_configure(); |
|
1025 |
|
|
1026 |
/* bring up carp interfaces */ |
|
1027 |
interfaces_carp_bringup(); |
|
1028 |
|
|
1029 |
/* set up static routes */ |
|
1030 |
system_routing_configure(); |
|
1031 |
|
|
1032 |
/* enable routing */ |
|
1033 |
system_routing_enable(); |
|
1034 |
} |
|
1035 |
|
|
1036 |
/****f* pfsense-utils/reload_all |
|
1037 |
* NAME |
|
1038 |
* reload_all - reload all settings |
|
1039 |
* * INPUTS |
|
1040 |
* none |
|
1041 |
* RESULT |
|
1042 |
* none |
|
1043 |
******/ |
|
1044 |
function reload_all() { |
|
1045 |
/* set up our timezone */ |
|
1046 |
system_timezone_configure(); |
|
1047 |
|
|
1048 |
/* set up our hostname */ |
|
1049 |
system_hostname_configure(); |
|
1050 |
|
|
1051 |
/* make hosts file */ |
|
1052 |
system_hosts_generate(); |
|
1053 |
|
|
1054 |
/* generate resolv.conf */ |
|
1055 |
system_resolvconf_generate(); |
|
1056 |
|
|
1057 |
/* set up LAN interface */ |
|
1058 |
interfaces_lan_configure(); |
|
1059 |
|
|
1060 |
/* set up WAN interface */ |
|
1061 |
interfaces_wan_configure(); |
|
1062 |
|
|
1063 |
/* set up Optional interfaces */ |
|
1064 |
interfaces_optional_configure(); |
|
1065 |
|
|
1066 |
/* bring up carp interfaces */ |
|
1067 |
interfaces_carp_bringup(); |
|
1068 |
|
|
1069 |
/* set up static routes */ |
|
1070 |
system_routing_configure(); |
|
1071 |
|
|
1072 |
/* enable routing */ |
|
1073 |
system_routing_enable(); |
|
1074 |
|
|
1075 |
/* ensure passwords are sync'd */ |
|
1076 |
system_password_configure(); |
|
1077 |
|
|
1078 |
/* start dnsmasq service */ |
|
1079 |
services_dnsmasq_configure(); |
|
1080 |
|
|
1081 |
/* start dyndns service */ |
|
1082 |
services_dyndns_configure(); |
|
1083 |
|
|
1084 |
/* start DHCP service */ |
|
1085 |
services_dhcpd_configure(); |
|
1086 |
|
|
1087 |
/* start the NTP client */ |
|
1088 |
system_ntp_configure(); |
|
1089 |
|
|
1090 |
/* start ftp proxy helpers if they are enabled */ |
|
1091 |
system_start_ftp_helpers(); |
|
1092 |
|
|
1093 |
/* reload the filter */ |
|
1094 |
filter_configure(); |
|
1095 |
} |
|
1096 |
|
|
1097 |
?> |
usr/local/www/interfaces_assign.php | ||
---|---|---|
112 | 112 |
} |
113 | 113 |
|
114 | 114 |
write_config(); |
115 |
touch($d_sysrebootreqd_path); |
|
115 |
|
|
116 |
/* reload all interfaces configuration */ |
|
117 |
reload_interfaces(); |
|
118 |
|
|
116 | 119 |
} |
117 | 120 |
} |
118 | 121 |
|
... | ... | |
186 | 189 |
<?php include("fbegin.inc"); ?> |
187 | 190 |
<p class="pgtitle"><?=$pgtitle?></p> |
188 | 191 |
<?php if ($input_errors) print_input_errors($input_errors); ?> |
189 |
<?php if (file_exists($d_sysrebootreqd_path)) print_info_box(get_std_save_message(0)); ?> |
|
190 | 192 |
<form action="interfaces_assign.php" method="post" name="iform" id="iform"> |
191 | 193 |
<table width="100%" border="0" cellpadding="0" cellspacing="0"> |
192 | 194 |
<tr><td class="tabnavtbl"> |
usr/local/www/interfaces_vlan.php | ||
---|---|---|
78 | 78 |
$config['interfaces']['opt' . $i]['if'] = renumber_vlan($config['interfaces']['opt' . $i]['if'], $_GET['id']); |
79 | 79 |
|
80 | 80 |
write_config(); |
81 |
touch($d_sysrebootreqd_path); |
|
81 |
|
|
82 |
reload_interfaces(); |
|
83 |
|
|
82 | 84 |
header("Location: interfaces_vlan.php"); |
83 | 85 |
exit; |
84 | 86 |
} |
... | ... | |
94 | 96 |
<?php include("fbegin.inc"); ?> |
95 | 97 |
<p class="pgtitle"><?=$pgtitle?></p> |
96 | 98 |
<?php if ($input_errors) print_input_errors($input_errors); ?> |
97 |
<?php if (file_exists($d_sysrebootreqd_path)) print_info_box(get_std_save_message(0)); ?> |
|
98 | 99 |
<table width="100%" border="0" cellpadding="0" cellspacing="0"> |
99 | 100 |
<tr><td> |
100 | 101 |
<?php |
usr/local/www/wizards/setup_wizard.xml | ||
---|---|---|
488 | 488 |
<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. |
489 | 489 |
<meta http-equiv="refresh" content="60; url=$myurl" ></description> |
490 | 490 |
<stepafterformdisplay> |
491 |
/* set up our timezone */ |
|
492 |
system_timezone_configure(); |
|
493 |
|
|
494 |
/* set up our hostname */ |
|
495 |
system_hostname_configure(); |
|
496 |
|
|
497 |
/* make hosts file */ |
|
498 |
system_hosts_generate(); |
|
499 |
|
|
500 |
/* generate resolv.conf */ |
|
501 |
system_resolvconf_generate(); |
|
502 |
|
|
503 |
/* set up LAN interface */ |
|
504 |
interfaces_lan_configure(); |
|
505 |
|
|
506 |
/* set up WAN interface */ |
|
507 |
interfaces_wan_configure(); |
|
508 |
|
|
509 |
/* set up Optional interfaces */ |
|
510 |
interfaces_optional_configure(); |
|
511 |
|
|
512 |
/* bring up carp interfaces */ |
|
513 |
interfaces_carp_bringup(); |
|
514 |
|
|
515 |
/* set up static routes */ |
|
516 |
system_routing_configure(); |
|
517 |
|
|
518 |
/* enable routing */ |
|
519 |
system_routing_enable(); |
|
520 |
|
|
521 |
/* ensure passwords are sync'd */ |
|
522 |
system_password_configure(); |
|
523 |
|
|
524 |
/* start dnsmasq service */ |
|
525 |
services_dnsmasq_configure(); |
|
526 |
|
|
527 |
/* start dyndns service */ |
|
528 |
services_dyndns_configure(); |
|
529 |
|
|
530 |
/* start DHCP service */ |
|
531 |
services_dhcpd_configure(); |
|
532 |
|
|
533 |
/* start the NTP client */ |
|
534 |
system_ntp_configure(); |
|
535 |
|
|
536 |
/* start ftp proxy helpers if they are enabled */ |
|
537 |
system_start_ftp_helpers(); |
|
538 |
|
|
539 |
/* reload the filter */ |
|
540 |
filter_configure(); |
|
491 |
reload_all(); |
|
541 | 492 |
</stepafterformdisplay> |
542 | 493 |
</step> |
543 | 494 |
</pfsensewizard> |
Also available in: Unified diff