* Fixed a bug in CBI throwing an error if a config section gets deleted

* Fixed automatic restart of olsrd while applying OLSR configuration
This commit is contained in:
Steven Barth 2008-04-22 14:37:20 +00:00
parent 007b82885f
commit 7eb6eebf51
2 changed files with 6 additions and 1 deletions

View file

@ -17,7 +17,7 @@ config extern flash_keep
config event uci_oncommit config event uci_oncommit
option network "/etc/init.d/network restart" option network "/etc/init.d/network restart"
option wireless "/etc/init.d/network restart" option wireless "/etc/init.d/network restart"
option olsrd "/etc/init.d/olsrd restart" option olsr "/etc/init.d/olsrd restart"
option dhcp "/etc/init.d/dnsmasq restart" option dhcp "/etc/init.d/dnsmasq restart"
option luci_fw "/etc/init.d/luci_fw restart" option luci_fw "/etc/init.d/luci_fw restart"
option dropbear "/etc/init.d/dropbear restart" option dropbear "/etc/init.d/dropbear restart"

View file

@ -178,6 +178,11 @@ function Map.del(self, section, option)
self.ucidata[section][option] = nil self.ucidata[section][option] = nil
else else
self.ucidata[section] = nil self.ucidata[section] = nil
for i, k in ipairs(self.ucidata[".order"]) do
if section == k then
table.remove(self.ucidata[".order"], i)
end
end
end end
end end
return stat return stat