Project

General

Profile

« Previous | Next » 

Revision de0de382

Added by Ermal LUÇI over 12 years ago

Correct a bit formating here

View differences:

etc/rc.newipsecdns
30 30
	POSSIBILITY OF SUCH DAMAGE.
31 31
*/
32 32

  
33
	/* parse the configuration and include all functions used below */
34
	require_once("config.inc");
35
	require_once("functions.inc");
36
	require_once("filter.inc");	
37
	require_once("shaper.inc");	
38
	require_once("ipsec.inc");
39
	require_once("vpn.inc");
40
	require_once("util.inc");
33
/* parse the configuration and include all functions used below */
34
require_once("util.inc");
35
require_once("config.inc");
36
require_once("gwlb.inc");
37
require_once("functions.inc");
38
require_once("filter.inc");	
39
require_once("shaper.inc");	
40
require_once("ipsec.inc");
41
require_once("vpn.inc");
41 42

  
42
	/* make sure to wait until the boot scripts have finished */
43
	while (file_exists("{$g['varrun_path']}/booting")) {
44
		sleep(1);
45
	}
46
	$ipseclck = lock('ipsecdns', LOCK_EX);
47
	
48
	if(isset($config['ipsec']['enable']))
49
		log_error("IPSEC: One or more IPsec tunnel endpoints has changed its IP. Refreshing.");
50
	/* We will walk the list of hostnames found in the ipsec tunnel
51
	 * configuration. Since we are already triggered by filterdns
52
	 * that a hostname has changed we can proceed to compare the 
53
	 * new IP address with the old address from the DNS cache.
54
	 */
55
	vpn_ipsec_refresh_policies();
56
	
57
	vpn_ipsec_configure();
43
/* make sure to wait until the boot scripts have finished */
44
if (file_exists("{$g['varrun_path']}/booting"))
45
	return;
46

  
47
if (isset($config['ipsec']['enable']))
48
	log_error("IPSEC: One or more IPsec tunnel endpoints has changed its IP. Refreshing.");
49
else
50
	return;
51

  
52
$ipseclck = lock('ipsecdns', LOCK_EX);
53

  
54
/* We will walk the list of hostnames found in the ipsec tunnel
55
 * configuration. Since we are already triggered by filterdns
56
 * that a hostname has changed we can proceed to compare the 
57
 * new IP address with the old address from the DNS cache.
58
 */
59
vpn_ipsec_refresh_policies();
60

  
61
vpn_ipsec_configure();
58 62

  
59
	unlock($ipseclck);
63
unlock($ipseclck);
60 64
?>

Also available in: Unified diff