You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.4 KiB
36 lines
1.4 KiB
From cf9073df710b4c650b7617a88720d4d4cd0a51bf Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?=D0=A1=D0=B5=D1=80=D0=B3=D0=B5=D0=B9=20=D0=9F=D1=80=D0=BE?=
|
|
=?UTF-8?q?=D1=85=D0=BE=D1=80=D0=BE=D0=B2?= <seriy.pr@gmail.com>
|
|
Date: Mon, 9 Sep 2013 03:52:02 +0400
|
|
Subject: [PATCH] Check /var/run/pluto/ipsec.info for existence before sourcing
|
|
it. Thanks to Gordon Messmer
|
|
https://bugzilla.redhat.com/show_bug.cgi?id=887674#c45
|
|
|
|
---
|
|
src/nm-l2tp-service.c | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/src/nm-l2tp-service.c b/src/nm-l2tp-service.c
|
|
index 38f67ef..1cc605a 100644
|
|
--- a/src/nm-l2tp-service.c
|
|
+++ b/src/nm-l2tp-service.c
|
|
@@ -899,13 +899,13 @@ nm_l2tp_start_ipsec(NML2tpPlugin *plugin,
|
|
}
|
|
sprintf(session_name, "nm-ipsec-l2tpd-%d", getpid());
|
|
|
|
- sys += system(". /var/run/pluto/ipsec.info;"
|
|
+ sys += system("test -e /var/run/pluto/ipsec.info && . /var/run/pluto/ipsec.info;"
|
|
"PATH=/usr/local/sbin:/usr/sbin:/sbin; export PATH;"
|
|
"[ \"x$defaultrouteaddr\" = \"x\" ] && ipsec setup restart");
|
|
|
|
sys += system("PATH=/usr/local/sbin:/usr/sbin:/sbin ipsec whack"
|
|
" --listen");
|
|
- sprintf(cmd1,". /var/run/pluto/ipsec.info;"
|
|
+ sprintf(cmd1,"test -e /var/run/pluto/ipsec.info && . /var/run/pluto/ipsec.info;"
|
|
"PATH=/usr/local/sbin:/usr/sbin:/sbin ipsec addconn "
|
|
" ${defaultrouteaddr:+--defaultroute} $defaultrouteaddr"
|
|
" ${defaultroutenexthop:+--defaultroutenexthop} $defaultroutenexthop"
|
|
--
|
|
1.8.3.1
|
|
|