summaryrefslogtreecommitdiffstats
path: root/package/ppp/files/etc
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2008-02-03 06:48:15 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2008-02-03 06:48:15 +0000
commitafa5da1d1bf575000d260e9abe26d47b94e3e117 (patch)
tree20d8c580675afbba4a8238eaa677d3f0fe438323 /package/ppp/files/etc
parent007000ead9f2531015d4c2c9f0b14be24d8d4aa1 (diff)
Here comes the new UCI. Enjoy :)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10367 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/ppp/files/etc')
-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 f3d63a019..30151f426 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 a50137f5d..acbb5997a 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"
}