Fix ipsecctrl hang at start of a connection.

Fixes bug #0000663
This commit is contained in:
Arne Fitzenreiter
2010-06-21 23:13:06 +02:00
parent af0e992480
commit 90070fc927

View File

@@ -140,6 +140,8 @@ void turn_connection_on (char *name, char *type) {
safe_system("/usr/sbin/ipsec reload >/dev/null");
memset(command, 0, STRING_SIZE);
/* give ipsec time to be ready */
safe_system("/bin/sleep 2");
snprintf(command, STRING_SIZE - 1,
"/usr/sbin/ipsec up %s >/dev/null", name);
safe_system(command);