1 #!/bin/sh /etc/rc.common
6 if [ -f /etc
/config
/luci_ethers
]; then
7 logger
-t luci_dhcp_migrate
"Migrating luci_ethers configuration ..."
9 lua
-lluci.model.uci
-e '
10 x=luci.model.uci.cursor()
11 x:foreach("luci_ethers", "static_lease",
13 x:section("dhcp", "host", nil, {mac=s.macaddr, ip=s.ipaddr})
19 rm -f /etc
/config
/luci_ethers
22 if [ -f /etc
/config
/luci_hosts
]; then
23 logger
-t luci_dhcp_migrate
"Migrating luci_hosts configuration ..."
25 lua
-lluci.model.uci
-e '
26 x=luci.model.uci.cursor()
27 x:foreach("luci_hosts", "host",
29 x:section("dhcp", "domain", nil, {name=s.hostname, ip=s.ipaddr})
35 rm -f /etc
/config
/luci_hosts