Hi

This patch add interface name handling for the NonOlsrIf Option in olsrd init 
script.
e.g. NonOlsrIf=lan and not NonOlsrIf=eth0

Signed-off-by: Patrick Grimm <patr...@lunatiki.de>

Index: olsrd.init
===================================================================
--- olsrd.init  (Revision 22459)
+++ olsrd.init  (Arbeitskopie)
@@ -171,6 +171,19 @@
                shift
                value="$*"
        fi
+       if [ "$option" = 'NonOlsrIf' ]; then
+               if validate_varname "$value"; then
+                       if get_ifname "$value"; then
+                               ifname="$IFNAME"
+                               echo "Info: mdns Interface '$value' ifname 
'$ifname' found" 1>&2
+                       else
+                               echo "Warning: mdns Interface '$value' not 
found, skipped" 1>&2
+                       fi
+               else
+                       warning_invalid_value olsrd "$cfg" "NonOlsrIf"
+               fi
+               [ -z "$ifname" ] || value=$ifname
+       fi
 
        echo -n "${N}${param}PlParam \"$option\" \"$value\""
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to