* applications/luci-splash: Removed dependency to sgi-haserl, Updated attributes
[project/luci.git] / applications / luci-splash / root / usr / sbin / luci-splash
old mode 100644 (file)
new mode 100755 (executable)
index fc3a0c8..72456c0
@@ -73,15 +73,20 @@ end
 -- Remove a lease from state and invoke remove_rule
 function remove_lease(mac)
        mac = mac:lower()
+       local del = {}
 
        uci.foreach("luci_splash", "lease",
                function (section)
                        if section.mac:lower() == mac then
-                               remove_rule(mac)
-                               uci.delete("luci_splash", section[".name"])
+                               table.insert(del, section[".name"])
                        end
                end)
                
+       for i,j in ipairs(del) do
+               remove_rule(j)
+               uci.delete("luci_splash", j)
+       end
+               
        uci.save()
 end