diff options
author | Nicolas Thill <nico@openwrt.org> | 2006-05-20 15:16:06 +0000 |
---|---|---|
committer | Nicolas Thill <nico@openwrt.org> | 2006-05-20 15:16:06 +0000 |
commit | 43cc80edc303bd332c3328f7856f671bd20b6d4f (patch) | |
tree | 0fa727aabaf6fed0b88bc1c9cec77792c8121843 /openwrt/package/ppp | |
parent | 549059cb74269f043c6de43464fed898108e54ff (diff) | |
download | mtk-20170518-43cc80edc303bd332c3328f7856f671bd20b6d4f.zip mtk-20170518-43cc80edc303bd332c3328f7856f671bd20b6d4f.tar.gz mtk-20170518-43cc80edc303bd332c3328f7856f671bd20b6d4f.tar.bz2 |
add support for multiple /etc/ppp/ip-{up,down} scripts.
SVN-Revision: 3804
Diffstat (limited to 'openwrt/package/ppp')
-rw-r--r-- | openwrt/package/ppp/Makefile | 2 | ||||
-rwxr-xr-x | openwrt/package/ppp/files/etc/ppp/ip-down | 7 | ||||
-rwxr-xr-x | openwrt/package/ppp/files/etc/ppp/ip-up | 7 |
3 files changed, 16 insertions, 0 deletions
diff --git a/openwrt/package/ppp/Makefile b/openwrt/package/ppp/Makefile index e63fa4c..c2c7c96 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 044759f..334bcb8 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 c67a3d0..34b4b50 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 +} |