aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-protocols/openl2tp/openl2tp
diff options
context:
space:
mode:
Diffstat (limited to 'meta-networking/recipes-protocols/openl2tp/openl2tp')
-rw-r--r--meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix-sysconfig.patch35
-rw-r--r--meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix-warning.patch32
-rw-r--r--meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix.patch49
-rw-r--r--meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd.service17
4 files changed, 133 insertions, 0 deletions
diff --git a/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix-sysconfig.patch b/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix-sysconfig.patch
new file mode 100644
index 0000000000..3119425e69
--- /dev/null
+++ b/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix-sysconfig.patch
@@ -0,0 +1,35 @@
+commit 6ea3125e2bec15004f312814022335d94cdf7e94
+Author: Aws Ismail <aws.ismail@windriver.com>
+Date: Wed Sep 19 11:34:48 2012 -0400
+
+ Fix openl2tp config script location
+
+ Correct the location of the sysconfig
+ script. Use /etc/default/ instead of
+ /etc/sysconfig/
+
+ Signed-off-by: Aws Ismail <aws.ismail@windriver.com>
+
+ Upstream-Status: Inappropriate [configuration]
+
+ Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+
+diff --git a/etc/rc.d/init.d/openl2tpd b/etc/rc.d/init.d/openl2tpd
+index 7f27bb7..4194f63 100755
+--- a/etc/rc.d/init.d/openl2tpd
++++ b/etc/rc.d/init.d/openl2tpd
+@@ -8,12 +8,12 @@
+ # can be used to implement L2TP VPNs. As a server, it can handle
+ # hundreds of tunnels and sessions.
+ # processname: openl2tpd
+-# config: /etc/sysconfig/openl2tpd
++# config: /etc/default/openl2tpd
+ # pidfile: /var/run/openl2tpd.pid
+
+ # Source function library.
+ . /etc/init.d/functions
+-. /etc/sysconfig/openl2tpd
++. /etc/default/openl2tpd
+
+ # See how we were called.
+
diff --git a/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix-warning.patch b/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix-warning.patch
new file mode 100644
index 0000000000..15a8c5b088
--- /dev/null
+++ b/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix-warning.patch
@@ -0,0 +1,32 @@
+openl2tp: eliminate warning from modprobe
+
+modprobe will emit alarming warnings if it cannot
+find a module, but we only care that it find one
+of two possible modules when we start openl2tpd.
+
+Suppress messages from modprobe.
+
+Upstream-Status: Pending
+
+Signed-off-by: Joe Slater <jslater@windriver.com>
+
+--- a/etc/rc.d/init.d/openl2tpd
++++ b/etc/rc.d/init.d/openl2tpd
+@@ -29,7 +29,7 @@ start() {
+ return 1
+ fi
+ fi
+- modprobe -s pppol2tp || modprobe -s l2tp_ppp
++ modprobe -sq pppol2tp || modprobe -sq l2tp_ppp
+ RETVAL=$?
+ if [ $RETVAL -eq 0 ]; then
+ start-stop-daemon --start --exec openl2tpd $OPENL2TPDARGS
+@@ -57,7 +57,7 @@ stop() {
+ return 1;
+ fi
+ killproc openl2tpd
+- modprobe -s -r pppol2tp || modprobe -s -r l2tp_ppp
++ modprobe -srq pppol2tp || modprobe -srq l2tp_ppp
+ echo
+ rm -f /var/run/openl2tpd.pid
+ rm -f /var/lock/subsys/openl2tpd
diff --git a/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix.patch b/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix.patch
new file mode 100644
index 0000000000..9ecd4b072f
--- /dev/null
+++ b/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-initscript-fix.patch
@@ -0,0 +1,49 @@
+commit 7c58a1e244ea83a9e7bbd51a6d354cee25cdbd33
+Author: Aws Ismail <aws.ismail@windriver.com>
+Date: Wed Sep 12 23:35:40 2012 -0400
+
+ Fix openl2tpd initscript
+
+ - Correct the location of the retval statement.
+ - use start-stop-daemon instead of daemon.
+
+ Signed-off-by: Aws Ismail <aws.ismail@windriver.com>
+
+ Upstream-Status: Inappropriate [OE specific]
+
+ Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+
+diff --git a/etc/rc.d/init.d/openl2tpd b/etc/rc.d/init.d/openl2tpd
+index ce21b50..7f27bb7 100755
+--- a/etc/rc.d/init.d/openl2tpd
++++ b/etc/rc.d/init.d/openl2tpd
+@@ -24,7 +24,7 @@ start() {
+ if [ -e /var/lock/subsys/openl2tpd ]; then
+ if [ -e /var/run/openl2tpd.pid ] && [ -e /proc/`cat /var/run/openl2tpd.pid` ]; then
+ echo -n $"cannot start openl2tpd: openl2tpd is already running.";
+- failure $"cannot start openl2tpd: openl2tpd already running.";
++ #failure $"cannot start openl2tpd: openl2tpd already running.";
+ echo
+ return 1
+ fi
+@@ -32,9 +32,9 @@ start() {
+ modprobe -s pppol2tp || modprobe -s l2tp_ppp
+ RETVAL=$?
+ if [ $RETVAL -eq 0 ]; then
+- daemon openl2tpd $OPENL2TPDARGS
++ start-stop-daemon --start --exec openl2tpd $OPENL2TPDARGS
++ RETVAL=$?
+ fi
+- RETVAL=$?
+ echo
+ if [ $RETVAL -eq 0 ]; then
+ touch /var/lock/subsys/openl2tpd
+@@ -52,7 +52,7 @@ stop() {
+ echo -n $"Stopping $prog: "
+ if [ ! -e /var/lock/subsys/openl2tpd ]; then
+ echo -n $"cannot stop openl2tpd: openl2tpd is not running."
+- failure $"cannot stop openl2tpd: openl2tpd is not running."
++ #failure $"cannot stop openl2tpd: openl2tpd is not running."
+ echo
+ return 1;
+ fi
diff --git a/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd.service b/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd.service
new file mode 100644
index 0000000000..7b3faf6725
--- /dev/null
+++ b/meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=The open L2TP implementation
+After=network.target remote-fs.target nss-lookup.target rpcbind.target
+Requires=rpcbind.service
+
+[Service]
+Type=forking
+PIDFile=@STATEDIR@/run/openl2tpd.pid
+EnvironmentFile=@SYSCONFDIR@/default/openl2tpd
+ExecStartPre=@BASE_BINDIR@/sh -c "@BASE_SBINDIR@/modprobe -sq l2tp_ppp || @BASE_SBINDIR@/modprobe -sq pppol2tp"
+ExecStart=@SBINDIR@/openl2tpd $OPENL2TPDARGS
+ExecStartPost=@BASE_BINDIR@/sh -c 'if [ -n "$OPENL2TPD_CONFIG_FILE" ]; then sleep 1; @BINDIR@/l2tpconfig config restore file=$OPENL2TPD_CONFIG_FILE; fi'
+ExecStopPost=@BASE_BINDIR@/sh -c "@BASE_SBINDIR@/modprobe -rsq l2tp_ppp || @BASE_SBINDIR@/modprobe -rsq pppol2tp"
+SuccessExitStatus=1
+
+[Install]
+WantedBy=multi-user.target