summaryrefslogtreecommitdiffhomepage
path: root/core
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-04-27 11:04:48 +0000
committerSteven Barth <steven@midlink.org>2008-04-27 11:04:48 +0000
commit706da44cf275dc20426a55a4d01ed79026d3eb80 (patch)
treef0cfced76009f7548a79d211a84fcb171079f028 /core
parentf917c0bb6445794cc94ff895f430db84a9e77ea2 (diff)
* Reworked Luci-Splash
* Created ffluci-system-addons package for Kamikaze addons
Diffstat (limited to 'core')
-rw-r--r--core/contrib/hotplug.d-20-aliases24
-rw-r--r--core/contrib/uci/luci2
-rw-r--r--core/src/ffluci/sys.lua13
3 files changed, 14 insertions, 25 deletions
diff --git a/core/contrib/hotplug.d-20-aliases b/core/contrib/hotplug.d-20-aliases
deleted file mode 100644
index b9986e3aa..000000000
--- a/core/contrib/hotplug.d-20-aliases
+++ /dev/null
@@ -1,24 +0,0 @@
-add_aliases() {
- local config="$1"
-
- config_get base "$INTERFACE" ifname
- config_get iface "$config" ifname
- config_get ipaddr "$config" ipaddr
- config_get auto "$config" auto
-
- [ "${iface%%:*}" == "$base" -a "$iface" != "$base" ] && {
- case "$auto" in
- 1|on|enabled) setup_interface "$iface" "$config";;
- *) return 1;;
- esac
- }
-}
-
-
-case "$ACTION" in
- ifup)
- include /lib/network
- scan_interfaces
- config_foreach "add_aliases" interface
- ;;
-esac
diff --git a/core/contrib/uci/luci b/core/contrib/uci/luci
index a3603d7ff..292e8f2b2 100644
--- a/core/contrib/uci/luci
+++ b/core/contrib/uci/luci
@@ -17,7 +17,7 @@ config extern flash_keep
config event uci_oncommit
option network "/etc/init.d/network restart"
option wireless "/etc/init.d/network restart"
- option olsr "/etc/init.d/olsrd restart"
+ option olsr "reboot"
option dhcp "/etc/init.d/dnsmasq restart"
option luci_fw "/etc/init.d/luci_fw restart"
option dropbear "/etc/init.d/dropbear restart"
diff --git a/core/src/ffluci/sys.lua b/core/src/ffluci/sys.lua
index cde1877de..8aa77cf13 100644
--- a/core/src/ffluci/sys.lua
+++ b/core/src/ffluci/sys.lua
@@ -134,6 +134,19 @@ function net.devices()
return devices
end
+-- Returns the MAC-Address belonging to the given IP-Address
+function net.ip4mac(ip)
+ local mac = nil
+
+ for i, l in ipairs(net.arptable()) do
+ if l["IP address"] == ip then
+ mac = l["HW address"]
+ end
+ end
+
+ return mac
+end
+
-- Returns the prefix to a given netmask
function net.mask4prefix(mask)
local bin = net.ip4bin(mask)