summaryrefslogtreecommitdiff
path: root/package/ppp/files/etc/ppp
diff options
context:
space:
mode:
Diffstat (limited to 'package/ppp/files/etc/ppp')
-rw-r--r--package/ppp/files/etc/ppp/chap-secrets1
-rw-r--r--package/ppp/files/etc/ppp/filter23
-rwxr-xr-xpackage/ppp/files/etc/ppp/ip-down9
-rwxr-xr-xpackage/ppp/files/etc/ppp/ip-down.d/umts7
-rwxr-xr-xpackage/ppp/files/etc/ppp/ip-up9
-rwxr-xr-xpackage/ppp/files/etc/ppp/ip-up.d/if-rename17
-rwxr-xr-xpackage/ppp/files/etc/ppp/ip-up.d/umts7
-rw-r--r--package/ppp/files/etc/ppp/options1
-rw-r--r--package/ppp/files/etc/ppp/peers/dsl12
-rw-r--r--package/ppp/files/etc/ppp/templates/dsl9
-rw-r--r--package/ppp/files/etc/ppp/templates/umts11
11 files changed, 106 insertions, 0 deletions
diff --git a/package/ppp/files/etc/ppp/chap-secrets b/package/ppp/files/etc/ppp/chap-secrets
new file mode 100644
index 000000000..6ab76e49e
--- /dev/null
+++ b/package/ppp/files/etc/ppp/chap-secrets
@@ -0,0 +1 @@
+#USERNAME PROVIDER PASSWORD IPADDRESS
diff --git a/package/ppp/files/etc/ppp/filter b/package/ppp/files/etc/ppp/filter
new file mode 100644
index 000000000..ec72a81a0
--- /dev/null
+++ b/package/ppp/files/etc/ppp/filter
@@ -0,0 +1,23 @@
+#
+# Expression: outbound and not icmp[0] != 8 and not tcp[13] & 4 != 0
+#
+19
+48 0 0 0
+21 0 16 1
+40 0 0 2
+21 0 13 33
+48 0 0 13
+21 0 5 1
+40 0 0 10
+69 9 0 8191
+177 0 0 4
+80 0 0 4
+21 6 7 8
+21 0 5 6
+40 0 0 10
+69 3 0 8191
+177 0 0 4
+80 0 0 17
+69 1 0 4
+6 0 0 4
+6 0 0 0
diff --git a/package/ppp/files/etc/ppp/ip-down b/package/ppp/files/etc/ppp/ip-down
new file mode 100755
index 000000000..334bcb885
--- /dev/null
+++ b/package/ppp/files/etc/ppp/ip-down
@@ -0,0 +1,9 @@
+#!/bin/sh
+[ -z "$6" ] || env -i ACTION="ifdown" INTERFACE="$6" PROTO=ppp /sbin/hotplug "iface"
+
+[ -d /etc/ppp/ip-down.d ] && {
+ for SCRIPT in /etc/ppp/ip-down.d/*
+ do
+ [ -x "$SCRIPT" ] && "$SCRIPT" $@
+ done
+}
diff --git a/package/ppp/files/etc/ppp/ip-down.d/umts b/package/ppp/files/etc/ppp/ip-down.d/umts
new file mode 100755
index 000000000..6c812a782
--- /dev/null
+++ b/package/ppp/files/etc/ppp/ip-down.d/umts
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+[ "$IF_USE_TEMPLATE" == "umts" ] || exit 0
+
+# enable bit 3, disable bit 4 - i.e. UMTS-LED from blue to green
+LED=$(cat /proc/sys/diag)
+echo $(((LED | 16) ^ 16 | 8)) > /proc/sys/diag
diff --git a/package/ppp/files/etc/ppp/ip-up b/package/ppp/files/etc/ppp/ip-up
new file mode 100755
index 000000000..34b4b50e1
--- /dev/null
+++ b/package/ppp/files/etc/ppp/ip-up
@@ -0,0 +1,9 @@
+#!/bin/sh
+[ -z "$6" ] || env -i ACTION="ifup" INTERFACE="$6" PROTO=ppp /sbin/hotplug "iface"
+
+[ -d /etc/ppp/ip-up.d ] && {
+ for SCRIPT in /etc/ppp/ip-up.d/*
+ do
+ [ -x "$SCRIPT" ] && "$SCRIPT" $@
+ done
+}
diff --git a/package/ppp/files/etc/ppp/ip-up.d/if-rename b/package/ppp/files/etc/ppp/ip-up.d/if-rename
new file mode 100755
index 000000000..061fd8861
--- /dev/null
+++ b/package/ppp/files/etc/ppp/ip-up.d/if-rename
@@ -0,0 +1,17 @@
+#!/bin/sh
+exit 0 # This script breaks ppp accounting
+
+[ "$LINKNAME" ] || exit 0
+
+PATH=/bin:/usr/sbin:$PATH
+if ip link show dev $LINKNAME >/dev/null;then
+ logger "$0: interface '$LINKNAME' already exists, cannot rename '$IFNAME'."
+ exit 0
+fi
+
+if ip route | grep -qE "^default.*dev $IFNAME *$"; then DEFAULT_ROUTE=1; fi
+
+ip link set $IFNAME down
+ip link set $IFNAME name $LINKNAME
+ip link set $LINKNAME up
+if [ -n "$DEFAULT_ROUTE" ]; then ip route add default via $IPREMOTE; fi
diff --git a/package/ppp/files/etc/ppp/ip-up.d/umts b/package/ppp/files/etc/ppp/ip-up.d/umts
new file mode 100755
index 000000000..0c18970e0
--- /dev/null
+++ b/package/ppp/files/etc/ppp/ip-up.d/umts
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+[ "$IF_USE_TEMPLATE" == "umts" ] || exit 0
+
+# enable bit 4 i.e. UMTS-LED blue
+LED=$(cat /proc/sys/diag)
+echo $((LED | 16)) > /proc/sys/diag
diff --git a/package/ppp/files/etc/ppp/options b/package/ppp/files/etc/ppp/options
new file mode 100644
index 000000000..4b67b6a0d
--- /dev/null
+++ b/package/ppp/files/etc/ppp/options
@@ -0,0 +1 @@
+lock
diff --git a/package/ppp/files/etc/ppp/peers/dsl b/package/ppp/files/etc/ppp/peers/dsl
new file mode 100644
index 000000000..7ffc38082
--- /dev/null
+++ b/package/ppp/files/etc/ppp/peers/dsl
@@ -0,0 +1,12 @@
+plugin rp-pppoe.so
+ipcp-accept-remote
+ipcp-accept-local
+usepeerdns
+defaultroute
+lcp-echo-interval 10
+lcp-echo-failure 3
+persist
+maxfail 0
+
+user "user@t-online.de"
+password "secret"
diff --git a/package/ppp/files/etc/ppp/templates/dsl b/package/ppp/files/etc/ppp/templates/dsl
new file mode 100644
index 000000000..2ad285ede
--- /dev/null
+++ b/package/ppp/files/etc/ppp/templates/dsl
@@ -0,0 +1,9 @@
+plugin rp-pppoe.so
+defaultroute
+usepeerdns
+lcp-echo-interval 10
+lcp-echo-failure 3
+#IDLEOPTIONS#
+user #USERNAME#
+password #PASSWORD#
+#DEVICE#
diff --git a/package/ppp/files/etc/ppp/templates/umts b/package/ppp/files/etc/ppp/templates/umts
new file mode 100644
index 000000000..e9c97bf06
--- /dev/null
+++ b/package/ppp/files/etc/ppp/templates/umts
@@ -0,0 +1,11 @@
+defaultroute
+usepeerdns
+lcp-echo-interval 10
+lcp-echo-failure 3
+crtscts
+460800
+connect "NUMBER='*99***1#' /usr/bin/comgt -s /etc/comgt/dial.comgt -d #DEVICE#"
+#IDLEOPTIONS#
+user #USERNAME#
+password #PASSWORD#
+#DEVICE#