Modify

Opened 8 years ago

Closed 8 years ago

#7255 closed defect (fixed)

The /lib/wifi/broadcom.sh does not start 3rd instance of NAS

Reported by: anonymous Owned by: jow
Priority: normal Milestone: Backfire 10.03.1
Component: packages Version: Backfire 10.03
Keywords: broadcom brcm-2.4 Cc:

Description

When three of WiFi AP are defined in /etc/config/wireless, the wifi command will fail to start the third nas instance.

This is caused by the start_stop_deamon utility, which reports that the nas is already running. Commenting the line 137

[ -n "$nas" ] && nas="start-stop-daemon -S -b -x $nas -- "

solved the problem.

Attachments (1)

Wireless.txt (949 bytes) - added by anonymous 8 years ago.
Failing wireless configuration

Download all attachments as: .zip

Change History (7)

Changed 8 years ago by anonymous

Failing wireless configuration

comment:1 Changed 8 years ago by anonymous

I have scanned the Subversion history - this line was introduced in R19257 /[package] broadcom-wl: properly detach nas by using start-stop-daemon to launch it/

comment:2 Changed 8 years ago by jow

  • Owner changed from developers to jow
  • Status changed from new to assigned

comment:3 Changed 8 years ago by jow

  • Status changed from assigned to accepted

comment:4 Changed 8 years ago by jow

Please try this patch:

Index: package/broadcom-wl/files/lib/wifi/broadcom.sh
===================================================================
--- package/broadcom-wl/files/lib/wifi/broadcom.sh	(revision 21111)
+++ package/broadcom-wl/files/lib/wifi/broadcom.sh	(working copy)
@@ -135,7 +135,6 @@
 
 	_c=0
 	nas="$(which nas)"
-	[ -n "$nas" ] && nas="start-stop-daemon -S -b -x $nas -- "
 	nas_cmd=
 	if_up=
 
@@ -292,7 +291,9 @@
 					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

comment:5 Changed 8 years ago by pbaahe@…

Hey

I have checked the provided patch. It works now.

But allow me to ask - why do need the start-stop-deamon anyway? A couple of lines below we have killall -KILL nas >&- 2>&- which should take care that no nas instance is running prior to executing $nas_cmd...

comment:6 Changed 8 years ago by jow

  • Resolution set to fixed
  • Status changed from accepted to closed

Fixed with r21394.
The start-stop-daemon was introduced to properly detach the process from the calling script.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.