#
-# Copyright (C) 2009-2011 OpenWrt.org
+# Copyright (C) 2009-2012 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
PKG_NAME:=olsrd
PKG_VERSION:=0.6.2
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://www.olsr.org/releases/0.6
#!/bin/sh /etc/rc.common
-# Copyright (C) 2008-2011 OpenWrt.org
+# Copyright (C) 2008-2012 OpenWrt.org
START=65
return 0
}
-validate_ifname() {
- local ifname="$1"
- [ -z "$ifname" -o "$ifname" != "${ifname%%[!A-Za-z0-9.:_-]*}" ] && return 1
- return 0
-}
-
validate_olsrd_option() {
local str="$1"
[ -z "$str" -o "$str" != "${str%%[! 0-9A-Za-z./|:_-]*}" ] && return 1
return 0
}
-get_ifname() {
- IFNAME=
- local interface="$1"
- validate_varname "$interface" || return 1
- local ifname
-
- config_get ifname "$interface" ifname
- validate_ifname "$ifname" || return 1
- IFNAME="$ifname"
- return 0
-}
-
system_config() {
local cfg="$1"
local cfgt
fi
if [ "$option" = 'NonOlsrIf' ]; then
if validate_varname "$value"; then
- if get_ifname "$value"; then
- ifname="$IFNAME"
+ if network_get_device ifname "$value"; then
echo "Info: mdns Interface '$value' ifname '$ifname' found" 1>&2
else
echo "Warning: mdns Interface '$value' not found, skipped" 1>&2
config_get interfaces "$cfg" interface
for interface in $interfaces; do
if validate_varname "$interface"; then
- if get_ifname "$interface"; then
+ if network_get_device IFNAME "$interface"; then
ifnames="$ifnames \"$IFNAME\""
ifsglobal="$ifsglobal $IFNAME"
else
olsrd_update_schema "list" "$@"
}
- include /lib/network
- scan_interfaces
+ . /lib/functions/network.sh
+
config_load olsrd
reset_cb