From e77ecd8e14b6255b7880456ef807df5a92e5f451 Mon Sep 17 00:00:00 2001 From: smos Date: Wed, 2 Mar 2011 12:52:42 +0100 Subject: Attempt to mitigate fork bombs of rc.newipsecdns. Alternatively we should probably bail out with a exit(0); instead. --- etc/rc.newipsecdns | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'etc/rc.newipsecdns') diff --git a/etc/rc.newipsecdns b/etc/rc.newipsecdns index c8fcabe..141f04a 100755 --- a/etc/rc.newipsecdns +++ b/etc/rc.newipsecdns @@ -43,6 +43,10 @@ while (file_exists("{$g['varrun_path']}/booting")) { sleep(1); } + while(stristr(shell_exec("/bin/ps auxww"), "rc.newipsecdns")) { + // log_error("There is an existing rc.newipsecdns running, sleeping 1 second"); + sleep(1); + } log_error("IPSEC: One or more IPsec tunnel endpoints has changed its IP. Refreshing."); /* We will walk the list of hostnames found in the ipsec tunnel -- cgit v1.1