Dumb question but... when start-stop-daemon returns, has the program it was
passed as an argument actually been started?
I just looked at the sources to br2684ctl and it doesn't go into the background
until *after* the device has been created... But if start-stop-daemon is
backgrounding itself before it starts the command, then that would explain why
when the script continues the interface nas0 might not yet have been created.
Which would create a race condition.
Is there an easy way to synchronize this?
Why use the -b flag to "start-stop-daemon" instead of passing it to "br2684ctl"
instead?
Also, because Openwrt tries to run all of its scripts in parallel (or so it
seems)... udhcpd is already started *before* we even finish setting the MAC
address of the nas0 interface, causing it to send the wrong clientid.
length 403: (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto UDP (17),
length 389)
0.0.0.0.68> 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from
0c:d5:02:58:dc:b3, length 361, xid 0x7768063e, Flags [none] (0x0000)
Client-Ethernet-Address 0c:d5:02:58:dc:b3
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Discover
Client-ID Option 61, length 7: ether 00:00:01:00:00:00
Vendor-Class Option 60, length 12: "udhcp 1.17.3"
MSZ Option 57, length 2: 576
Parameter-Request Option 55, length 8:
Subnet-Mask, Default-Gateway, Domain-Name-Server, Hostname
Domain-Name, RP, BR, NTP
so the MAC address of the ATM PDU is correct, but the DHCP clientid is the
default one that nas0 gets created with.
I've updated my patch, but I still need to have udhcp wait before br2684ctl
exits before starting...
-Philip
On 3/12/11 11:24 AM, Philip Prindeville wrote:
Some ISP's will only allow you to use their equipment, and pre-register its MAC
address when provisioning your circuit.
If you can get the public side MAC address from the box, provision this as the
'hwaddr' option in the atm-bridge config and you can spoof their equipment.
Only problem... the hw address doesn't get set when I reboot with this patch,
but if I kill br2684ctl on a running system and rerun the init script, then it
takes... not sure why or how to go about debugging an init script at boot time.
Looked on the wiki and there wasn't much on the topic.
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel