* Drop kick reboots bye bye

This commit is contained in:
Scott Ullrich 2005-07-24 22:35:05 +00:00
parent 5f78884c96
commit 3851094fc6
10 changed files with 42 additions and 66 deletions

View File

@ -126,11 +126,9 @@ if ($_POST) {
write_config();
$retval = 0;
if (!file_exists($d_sysrebootreqd_path)) {
config_lock();
$retval = services_dhcrelay_configure();
config_unlock();
}
config_lock();
$retval = services_dhcrelay_configure();
config_unlock();
$savemsg = get_std_save_message($retval);
}

View File

@ -114,14 +114,13 @@ if ($_POST) {
write_config();
$retval = 0;
if (!file_exists($d_sysrebootreqd_path)) {
/* nuke the cache file */
config_lock();
services_dyndns_reset();
$retval = services_dyndns_configure();
$retval |= services_dnsupdate_process();
config_unlock();
}
/* nuke the cache file */
config_lock();
services_dyndns_reset();
$retval = services_dyndns_configure();
$retval |= services_dnsupdate_process();
config_unlock();
$savemsg = get_std_save_message($retval);
}
}

View File

@ -44,11 +44,9 @@ if ($_POST) {
$pconfig = $_POST;
$retval = 0;
if (!file_exists($d_sysrebootreqd_path)) {
config_lock();
$retval = services_proxyarp_configure();
config_unlock();
}
config_lock();
$retval = services_proxyarp_configure();
config_unlock();
$savemsg = get_std_save_message($retval);
if ($retval == 0) {

View File

@ -160,16 +160,14 @@ if ($_POST) {
$retval = 0;
if (!file_exists($d_sysrebootreqd_path)) {
config_lock();
$retval = filter_configure();
if(stristr($retval, "error") <> true)
$savemsg = get_std_save_message($retval);
else
$savemsg = $retval;
$retval |= interfaces_optional_configure();
config_unlock();
}
config_lock();
$retval = filter_configure();
if(stristr($retval, "error") <> true)
$savemsg = get_std_save_message($retval);
else
$savemsg = $retval;
$retval |= interfaces_optional_configure();
config_unlock();
$etc_ttys = return_filename_as_array("/etc/ttys");
$boot_loader_rc = return_filename_as_array("/boot/loader.rc");

View File

@ -46,10 +46,10 @@ if ($_POST) {
if ($_POST['apply']) {
$retval = 0;
if (!file_exists($d_sysrebootreqd_path)) {
$retval = system_routing_configure();
$retval |= filter_configure();
}
$retval = system_routing_configure();
$retval |= filter_configure();
$savemsg = get_std_save_message($retval);
if ($retval == 0) {
if (file_exists($d_staticroutesdirty_path)) {

View File

@ -43,8 +43,7 @@ if ($_POST) {
if ($_POST['apply']) {
$retval = 0;
if (!file_exists($d_sysrebootreqd_path))
$retval = vpn_ipsec_configure();
$retval = vpn_ipsec_configure();
$savemsg = get_std_save_message($retval);
if ($retval == 0) {
if (file_exists($d_ipsecconfdirty_path))
@ -58,13 +57,12 @@ if ($_POST) {
write_config();
$retval = 0;
if (!file_exists($d_sysrebootreqd_path)) {
config_lock();
$retval = vpn_ipsec_configure();
config_unlock();
/* reload the filter in the background */
mwexec_bg("/etc/rc.filter_configure");
}
config_lock();
$retval = vpn_ipsec_configure();
config_unlock();
/* reload the filter in the background */
mwexec_bg("/etc/rc.filter_configure");
$savemsg = get_std_save_message($retval);
if ($retval == 0) {
if (file_exists($d_ipsecconfdirty_path))
@ -77,7 +75,6 @@ if ($_GET['act'] == "del") {
if ($a_ipsec[$_GET['id']]) {
unset($a_ipsec[$_GET['id']]);
write_config();
touch($d_ipsecconfdirty_path);
header("Location: vpn_ipsec.php");
exit;
}

View File

@ -89,7 +89,7 @@ if ($_POST) {
/* Make sure that the tunnel interface type has not changed */
if ($server['tun_iface'] != $_POST['tun_iface']){
$server['tun_iface'] = $_POST['tun_iface'];
touch($d_sysrebootreqd_path);
}
$server['bind_iface'] = $_POST['bind_iface'];
@ -99,11 +99,9 @@ if ($_POST) {
/* Make sure the IP address and/or prefix have not changed */
if ($server['ipblock'] != $_POST['ipblock']){
$server['ipblock'] = $_POST['ipblock'];
touch($d_sysrebootreqd_path);
}
if ($server['prefix'] != $_POST['prefix']){
$server['prefix'] = $_POST['prefix'];
touch($d_sysrebootreqd_path);
}
$server['maxcli'] = $_POST['maxcli'];
@ -155,7 +153,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="vpn_openvpn.php" method="post" enctype="multipart/form-data" name="iform" id="iform">
<table width="100%" border="0" cellpadding="0" cellspacing="0">

View File

@ -42,15 +42,9 @@ $ovpncli =& $config['ovpn']['client']['tunnel'];
if ($_POST['apply']) {
$retval = 0;
if (file_exists($d_sysrebootreqd_path)) {
/* Rewrite interface definitions */
$retval = ovpn_client_iface();
}
else{
ovpn_lock();
$retval = ovpn_config_client();
ovpn_unlock();
}
ovpn_lock();
$retval = ovpn_config_client();
ovpn_unlock();
if (file_exists($d_ovpnclidirty_path))
unlink($d_ovpnclidirty_path);
$savemsg = get_std_save_message($retval);

View File

@ -131,18 +131,15 @@ if (isset($_POST['pull'])) {
$input_errors[] = "Run out of devices for a tunnel of type {$_POST['type']}";
else
$ovpnent['if'] = $nxt_if;
/* Need to reboot in order to create interfaces cleanly */
touch($d_sysrebootreqd_path);
}
/* Has the enable/disable state changed? */
if (isset($ovpnent['enable']) && isset($_POST['disabled'])) {
touch($d_sysrebootreqd_path);
touch($d_ovpnclidirty_path);
ovpn_client_kill($id);
ovpn_client_iface_del($id);
}
if (!isset($ovpnent['enable']) && !isset($_POST['disabled'])) {
touch($d_sysrebootreqd_path);
touch($d_ovpnclidirty_path);
}
}
@ -155,8 +152,6 @@ if (isset($_POST['pull'])) {
else
$ovpnent['if'] = $nxt_if;
$ovpnent['cport'] = getnxt_port();
/* I think we have to reboot to have the interface created cleanly */
touch($d_sysrebootreqd_path);
}
$ovpnent['type'] = $_POST['type'];
$ovpnent['proto'] = $_POST['proto'];

View File

@ -112,11 +112,11 @@ if ($_POST) {
write_config();
$retval = 0;
if (!file_exists($d_sysrebootreqd_path)) {
config_lock();
$retval = vpn_pptpd_configure();
config_unlock();
}
config_lock();
$retval = vpn_pptpd_configure();
config_unlock();
$savemsg = get_std_save_message($retval);
}
}