diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2010-07-14 19:58:43 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2010-07-14 19:58:43 +0200 |
commit | 4cfceb141c0770aa37123fde6fc26c28283314ad (patch) | |
tree | 8973da1d99561d6ede8c4c69253d528a70e197f8 /package/ppp/files/etc/ppp | |
parent | 3b76e79f14e279a6526809e630e45e4f760d77de (diff) | |
parent | ba4b6056da30ddb19809b72309a009a1c84a7656 (diff) |
Merge branch 'master' of git+ssh://openadk.org/git/openadk
Diffstat (limited to 'package/ppp/files/etc/ppp')
-rwxr-xr-x | package/ppp/files/etc/ppp/ip-down | 2 | ||||
-rw-r--r-- | package/ppp/files/etc/ppp/ip-down.d/01-resolver | 8 | ||||
-rwxr-xr-x | package/ppp/files/etc/ppp/ip-down.d/umts | 7 | ||||
-rwxr-xr-x | package/ppp/files/etc/ppp/ip-up | 2 | ||||
-rw-r--r-- | package/ppp/files/etc/ppp/ip-up.d/01-resolver | 12 | ||||
-rw-r--r-- | package/ppp/files/etc/ppp/ip-up.d/02-ntp | 10 | ||||
-rwxr-xr-x | package/ppp/files/etc/ppp/ip-up.d/umts | 7 | ||||
-rw-r--r-- | package/ppp/files/etc/ppp/templates/pppoe | 1 |
8 files changed, 31 insertions, 18 deletions
diff --git a/package/ppp/files/etc/ppp/ip-down b/package/ppp/files/etc/ppp/ip-down index 334bcb885..a4756b768 100755 --- a/package/ppp/files/etc/ppp/ip-down +++ b/package/ppp/files/etc/ppp/ip-down @@ -1,6 +1,4 @@ #!/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 diff --git a/package/ppp/files/etc/ppp/ip-down.d/01-resolver b/package/ppp/files/etc/ppp/ip-down.d/01-resolver new file mode 100644 index 000000000..78eaea035 --- /dev/null +++ b/package/ppp/files/etc/ppp/ip-down.d/01-resolver @@ -0,0 +1,8 @@ +#!/bin/sh +if [ -n "$USEPEERDNS" -a -f /etc/ppp/resolv.conf ]; then + if [ -f /etc/ppp/resolv.prev ]; then + cp -f /etc/ppp/resolv.prev /etc/resolv.conf + else + rm -f /etc/resolv.conf + fi +fi diff --git a/package/ppp/files/etc/ppp/ip-down.d/umts b/package/ppp/files/etc/ppp/ip-down.d/umts deleted file mode 100755 index 6c812a782..000000000 --- a/package/ppp/files/etc/ppp/ip-down.d/umts +++ /dev/null @@ -1,7 +0,0 @@ -#!/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 index 34b4b50e1..2ccefc01c 100755 --- a/package/ppp/files/etc/ppp/ip-up +++ b/package/ppp/files/etc/ppp/ip-up @@ -1,6 +1,4 @@ #!/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 diff --git a/package/ppp/files/etc/ppp/ip-up.d/01-resolver b/package/ppp/files/etc/ppp/ip-up.d/01-resolver new file mode 100644 index 000000000..0a980bde6 --- /dev/null +++ b/package/ppp/files/etc/ppp/ip-up.d/01-resolver @@ -0,0 +1,12 @@ +#!/bin/sh +if [ -n "$USEPEERDNS" -a -f /etc/ppp/resolv.conf ]; then + rm -f /etc/ppp/resolv.prev + if [ -f /etc/resolv.conf ]; then + cp /etc/resolv.conf /etc/ppp/resolv.prev + grep domain /etc/ppp/resolv.prev > /etc/resolv.conf + grep search /etc/ppp/resolv.prev >> /etc/resolv.conf + cat /etc/ppp/resolv.conf >> /etc/resolv.conf + else + cp /etc/ppp/resolv.conf /etc + fi +fi diff --git a/package/ppp/files/etc/ppp/ip-up.d/02-ntp b/package/ppp/files/etc/ppp/ip-up.d/02-ntp new file mode 100644 index 000000000..ac25dd567 --- /dev/null +++ b/package/ppp/files/etc/ppp/ip-up.d/02-ntp @@ -0,0 +1,10 @@ +#!/bin/sh + +. /etc/rc.conf + +# get time via ntpclient if available +[ -x /usr/sbin/ntpclient ] && ntpclient -s -h pool.ntp.org +# get time via rdate if available +[ -x /usr/sbin/rdate ] && rdate -nv pool.ntp.org +# restart ntpd when enabled +test x"${ntpd:-NO}" = x"NO" || /etc/init.d/ntpd restart diff --git a/package/ppp/files/etc/ppp/ip-up.d/umts b/package/ppp/files/etc/ppp/ip-up.d/umts deleted file mode 100755 index 0c18970e0..000000000 --- a/package/ppp/files/etc/ppp/ip-up.d/umts +++ /dev/null @@ -1,7 +0,0 @@ -#!/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/templates/pppoe b/package/ppp/files/etc/ppp/templates/pppoe index 2ad285ede..de5dd3bef 100644 --- a/package/ppp/files/etc/ppp/templates/pppoe +++ b/package/ppp/files/etc/ppp/templates/pppoe @@ -4,6 +4,7 @@ usepeerdns lcp-echo-interval 10 lcp-echo-failure 3 #IDLEOPTIONS# +#NETWORKOPTIONS# user #USERNAME# password #PASSWORD# #DEVICE# |