aboutsummaryrefslogtreecommitdiffstats
path: root/package/ppp/files
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2008-02-03 06:48:15 +0000
committerFelix Fietkau <nbd@openwrt.org>2008-02-03 06:48:15 +0000
commit0cf1a58282bacda7552d294e0f99562ece74cf22 (patch)
treef1c533f73a26f5da018025fae277a27c84ecdfc0 /package/ppp/files
parent32f2870131750e44e5a73f6255f077cddca2bca1 (diff)
downloadupstream-0cf1a58282bacda7552d294e0f99562ece74cf22.tar.gz
upstream-0cf1a58282bacda7552d294e0f99562ece74cf22.tar.bz2
upstream-0cf1a58282bacda7552d294e0f99562ece74cf22.zip
Here comes the new UCI. Enjoy :)
SVN-Revision: 10367
Diffstat (limited to 'package/ppp/files')
-rwxr-xr-xpackage/ppp/files/etc/ppp/ip-down4
-rwxr-xr-xpackage/ppp/files/etc/ppp/ip-up4
2 files changed, 3 insertions, 5 deletions
diff --git a/package/ppp/files/etc/ppp/ip-down b/package/ppp/files/etc/ppp/ip-down
index f3d63a019a..30151f426d 100755
--- a/package/ppp/files/etc/ppp/ip-down
+++ b/package/ppp/files/etc/ppp/ip-down
@@ -10,9 +10,7 @@ export PPP_IFACE PPP_TTY PPP_SPEED PPP_LOCAL PPP_REMOTE PPP_IPPARAM
env -i ACTION="ifdown" INTERFACE="$PPP_IPPARAM" DEVICE="$PPP_IFACE" PROTO=ppp /sbin/hotplug-call "iface"
# remove the interface's network state
- FILE=/var/state/network.$$
- grep -v "^config_set '$PPP_IPPARAM' " /var/state/network > "$FILE"
- mv "$FILE" /var/state/network
+ uci_revert_state network "$PPP_IPPARAM"
}
[ -d /etc/ppp/ip-down.d ] && {
diff --git a/package/ppp/files/etc/ppp/ip-up b/package/ppp/files/etc/ppp/ip-up
index a50137f5d4..acbb5997ae 100755
--- a/package/ppp/files/etc/ppp/ip-up
+++ b/package/ppp/files/etc/ppp/ip-up
@@ -8,8 +8,8 @@ PPP_IPPARAM="$6"
export PPP_IFACE PPP_TTY PPP_SPEED PPP_LOCAL PPP_REMOTE PPP_IPPARAM
[ -z "$PPP_IPPARAM" ] || env -i ACTION="ifup" INTERFACE="$PPP_IPPARAM" DEVICE="$PPP_IFACE" PROTO=ppp /sbin/hotplug-call "iface"
[ -z "$PPP_IPPARAM" -o -z "$PPP_LOCAL" ] || {
- uci set "/var/state/network.$PPP_IPPARAM.ipaddr=$PPP_LOCAL"
- uci set "/var/state/network.$PPP_IPPARAM.gateway=$PPP_REMOTE"
+ uci_set_state network "$PPP_IPPARAM" ipaddr "$PPP_LOCAL"
+ uci_set_state network "$PPP_IPPARAM" gateway "$PPP_REMOTE"
}