3 olsrd_list_configured_interfaces
()
8 while interface
="$( uci -q get olsrd.@Interface[$i].interface )"; do {
9 case "$( uci -q get olsrd.@Interface[$i].ignore )" in
10 1|on|true|enabled|
yes)
22 olsrd_interface_needs_adding
()
24 local interface
="$1" # e.g. wlanadhocRADIO1
25 local device
="$2" # e.g. wlan1-1
27 local config
="/var/etc/olsrd.conf"
29 for myif
in $
(olsrd_list_configured_interfaces
); do {
30 [ "$myif" = "$interface" ] && {
31 if grep -s ^
'Interface ' "$config" |
grep -q "\"$device\""; then
32 logger
-t olsrd_hotplug
-p daemon.debug
"[OK] already_active: $INTERFACE => $DEVICE"
35 logger
-t olsrd_hotplug
-p daemon.info
"[OK] ifup: $INTERFACE => $DEVICE"
41 logger
-t olsrd_hotplug
-p daemon.debug
"[OK] interface $INTERFACE not used for olsrd"
47 /etc
/init.d
/olsrd enabled
&& {
48 olsrd_interface_needs_adding
"$INTERFACE" "$DEVICE" && {
49 /etc
/init.d
/olsrd restart