netifyd: Fixed broken auto-configuration options passing.
authorDarryl Sokoloski <redacted>
Tue, 25 May 2021 17:41:13 +0000 (13:41 -0400)
committerDarryl Sokoloski <redacted>
Tue, 25 May 2021 17:41:13 +0000 (13:41 -0400)
Signed-off-by: Darryl Sokoloski <redacted>
net/netifyd/Makefile
net/netifyd/files/netifyd.init

index ac99b17ba0bb7e122650c8cea956ef4a1e5ee157..18a447a60bdac027e42ddf806df8333e2072a647 100644 (file)
@@ -6,7 +6,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=netifyd
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_MAINTAINER:=Darryl Sokoloski <darryl@egloo.ca>
 PKG_LICENSE:=GPL-3.0-or-later
 
index 4d629f7a2639b19ad396f55f2b199b707e0df81d..3bc0282353f93b65fcd934ea1819c246d65a4edf 100644 (file)
@@ -19,30 +19,30 @@ function append_ifopts() {
        local filter_expr=
 
        for a in $1; do
-           case $a in
-           -F|--device-filter)
-               filter=1
-               procd_append_param command $a
-               ;;
-           -*)
-               if [ $filter -gt 0 ]; then
-                   procd_append_param command "${filter_expr#\ }"
-                   filter=0; filter_expr=
-               fi
-               procd_append_param command $a
-               ;;
-           *)
-               if [ $filter -gt 0 ]; then
-                   a=${a#\"}; a=${a%\"}; a=${a#\'}; a=${a%\'}
-                   filter_expr="$filter_expr $a"
-               else
-                   procd_append_param command $a
-               fi
-           esac
+               case $a in
+               -F|--device-filter)
+                       filter=1
+                       procd_append_param command $a
+                       ;;
+               -*)
+                       if [ $filter -gt 0 ]; then
+                               procd_append_param command "${filter_expr#\ }"
+                               filter=0; filter_expr=
+                       fi
+                       procd_append_param command $a
+                       ;;
+               *)
+                       if [ $filter -gt 0 ]; then
+                               a=${a#\"}; a=${a%\"}; a=${a#\'}; a=${a%\'}
+                               filter_expr="$filter_expr $a"
+                       else
+                               procd_append_param command $a
+                       fi
+               esac
        done
 
        if [ $filter -gt 0 ]; then
-           procd_append_param command "${filter_expr#\ }"
+               procd_append_param command "${filter_expr#\ }"
        fi
 }
 
@@ -55,7 +55,7 @@ function append_external_if() {
 }
 
 start_netifyd() {
-       local autoconfig enabled instance
+       local autoconfig enabled instance options
 
        instance="$1"
        config_get_bool enabled "$instance" enabled 0
@@ -75,8 +75,9 @@ start_netifyd() {
        config_get_bool autoconfig "$instance" autoconfig 1
 
        if [ "$autoconfig" -gt 0 ]; then
-           NETIFYD_AUTODETECT=yes
-           procd_append_param command "$(auto_detect_options)"
+               NETIFYD_AUTODETECT=yes
+               options="$(auto_detect_options)"
+               [ ! -z "$options" ] && procd_append_param command $options
        fi
 
        config_list_foreach "$instance" internal_if append_internal_if
git clone https://git.99rst.org/PROJECT