aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Thill <nico@openwrt.org>2006-05-20 15:16:06 +0000
committerNicolas Thill <nico@openwrt.org>2006-05-20 15:16:06 +0000
commit65825e3dbad8381f3739bf565aed8120fef6defd (patch)
tree1fd6cb7741f32fa918379a05aa6137bff2b5a893
parent477d47a0ea9df09b851859b5a2124a5ef285266a (diff)
downloadupstream-65825e3dbad8381f3739bf565aed8120fef6defd.tar.gz
upstream-65825e3dbad8381f3739bf565aed8120fef6defd.tar.bz2
upstream-65825e3dbad8381f3739bf565aed8120fef6defd.zip
add support for multiple /etc/ppp/ip-{up,down} scripts.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@3804 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--openwrt/package/ppp/Makefile2
-rwxr-xr-xopenwrt/package/ppp/files/etc/ppp/ip-down7
-rwxr-xr-xopenwrt/package/ppp/files/etc/ppp/ip-up7
3 files changed, 16 insertions, 0 deletions
diff --git a/openwrt/package/ppp/Makefile b/openwrt/package/ppp/Makefile
index e63fa4cf504..c2c7c969403 100644
--- a/openwrt/package/ppp/Makefile
+++ b/openwrt/package/ppp/Makefile
@@ -95,7 +95,9 @@ $(IPKG_PPP):
install -m0644 ./files/etc/ppp/options $(IDIR_PPP)/etc/ppp/
$(INSTALL_FILTER)
install -m0755 ./files/etc/ppp/ip-up $(IDIR_PPP)/etc/ppp/
+ install -d -m0755 ./files/etc/ppp/ip-up.d
install -m0755 ./files/etc/ppp/ip-down $(IDIR_PPP)/etc/ppp/
+ install -d -m0755 ./files/etc/ppp/ip-down.d
install -d -m0755 $(IDIR_PPP)/usr/sbin
install -m0755 $(PKG_INSTALL_DIR)/usr/sbin/pppd $(IDIR_PPP)/usr/sbin/
install -d -m0755 $(IDIR_PPP)/usr/lib/pppd
diff --git a/openwrt/package/ppp/files/etc/ppp/ip-down b/openwrt/package/ppp/files/etc/ppp/ip-down
index 044759fbf1d..334bcb885af 100755
--- a/openwrt/package/ppp/files/etc/ppp/ip-down
+++ b/openwrt/package/ppp/files/etc/ppp/ip-down
@@ -1,2 +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/openwrt/package/ppp/files/etc/ppp/ip-up b/openwrt/package/ppp/files/etc/ppp/ip-up
index c67a3d03c5d..34b4b50e15a 100755
--- a/openwrt/package/ppp/files/etc/ppp/ip-up
+++ b/openwrt/package/ppp/files/etc/ppp/ip-up
@@ -1,2 +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
+}