Here comes the new UCI. Enjoy :)
[openwrt-10.03/.git] / package / ppp / files / etc / ppp / ip-down
index f3d63a019af89859541203a13d8950a1b52f2109..30151f426d7c4be5e2cdc7425d044f15b9bbd646 100755 (executable)
@@ -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 ] && {