summaryrefslogtreecommitdiffstats
path: root/package/pptp/ipkg/etc/init.d/S50pptp
diff options
context:
space:
mode:
Diffstat (limited to 'package/pptp/ipkg/etc/init.d/S50pptp')
-rwxr-xr-xpackage/pptp/ipkg/etc/init.d/S50pptp18
1 files changed, 18 insertions, 0 deletions
diff --git a/package/pptp/ipkg/etc/init.d/S50pptp b/package/pptp/ipkg/etc/init.d/S50pptp
new file mode 100755
index 000000000..34ff8a63b
--- /dev/null
+++ b/package/pptp/ipkg/etc/init.d/S50pptp
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+. /etc/functions.sh
+
+WAN_PROTO=$(nvram get wan_proto)
+[ "$WAN_PROTO" = "pptp" ] || exit 0
+
+for module in ip_gre slhc ppp_generic ppp_async ppp_deflate ; do
+ /sbin/insmod $module 2>/dev/null >/dev/null
+done
+
+if test -d "/var/lock"; then
+ mkdir -p /var/lock || exit 1
+fi
+
+/usr/sbin/pppd pty "pptp x.x.x.x --loglevel 0 --nolaunchpppd" file /etc/ppp/options.pptp
+
+