summaryrefslogtreecommitdiff
path: root/package/ppp/files/etc/ppp/ip-up.d
diff options
context:
space:
mode:
Diffstat (limited to 'package/ppp/files/etc/ppp/ip-up.d')
-rw-r--r--package/ppp/files/etc/ppp/ip-up.d/01-resolver12
-rw-r--r--package/ppp/files/etc/ppp/ip-up.d/02-ntp10
-rwxr-xr-xpackage/ppp/files/etc/ppp/ip-up.d/umts7
3 files changed, 22 insertions, 7 deletions
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