broadcom-wl: check iface pid file when invoking nas, fixes starting nas for additiona...
authorJo-Philipp Wich <jow@openwrt.org>
Fri, 7 May 2010 11:24:22 +0000 (11:24 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Fri, 7 May 2010 11:24:22 +0000 (11:24 +0000)
SVN-Revision: 21394

package/broadcom-wl/files/lib/wifi/broadcom.sh

index bfb7ed25eeec2e9ef49877483760f659d3f9d8f8..976665cb0b4ef777c4890efb6334f35e4066dc8f 100644 (file)
@@ -135,7 +135,6 @@ enable_broadcom() {
 
        _c=0
        nas="$(which nas)"
-       [ -n "$nas" ] && nas="start-stop-daemon -S -b -x $nas -- "
        nas_cmd=
        if_up=
 
@@ -292,7 +291,9 @@ enable_broadcom() {
                                        use_nas=0
                                }
                        }
-                       [ -z "$nas" -o "$use_nas" = "0" ] || nas_cmd="${nas_cmd:+$nas_cmd$N}$nas -P /var/run/nas.$ifname.pid -H 34954 ${bridge:+ -l $bridge} -i $ifname $nas_mode -m $auth -w $wsec -s \"\$${vif}_ssid\" -g 3600 $nasopts &"
+                       [ -z "$nas" -o "$use_nas" = "0" ] || {
+                               nas_cmd="${nas_cmd:+$nas_cmd$N}start-stop-daemon -S -b -p /var/run/nas.$ifname.pid -x $nas -- -P /var/run/nas.$ifname.pid -H 34954 ${bridge:+ -l $bridge} -i $ifname $nas_mode -m $auth -w $wsec -s \"\$${vif}_ssid\" -g 3600 $nasopts"
+                       }
                }
                _c=$(($_c + 1))
        done