add support for multiple /etc/ppp/ip-{up,down} scripts.
authorNicolas Thill <nico@openwrt.org>
Sat, 20 May 2006 15:16:06 +0000 (15:16 +0000)
committerNicolas Thill <nico@openwrt.org>
Sat, 20 May 2006 15:16:06 +0000 (15:16 +0000)
SVN-Revision: 3804

openwrt/package/ppp/Makefile
openwrt/package/ppp/files/etc/ppp/ip-down
openwrt/package/ppp/files/etc/ppp/ip-up

index e63fa4cf5040fc0c999e36c3248543330648936e..c2c7c9694031ff24f8b72100663249ee4d055849 100644 (file)
@@ -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
index 044759fbf1de9b2b160a61008ba0efe2662ab50a..334bcb885afdd68e4f4a2ebd58acc2b9277cd6f9 100755 (executable)
@@ -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
+}
index c67a3d03c5defc89324d9b6d3cf9adc95a451f07..34b4b50e15ae0f1d2af865f5487e10cf76a88304 100755 (executable)
@@ -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
+}