- Status Unconfirmed
- Percent Complete
- Task Type Bug Report
- Category Base system
- Assigned To No-one
- Operating System All
- Severity Low
- Priority Very Low
- Reported Version Trunk
- Due in Version Undecided
-
Due Date
Undecided
- Private
FS#3493 - hotplug firmware scripts run twice for each device, for ACTION=add, and ACTION=remove
Test device: ath79 mikrotik wap-g on snapshot r15165-66d12ce667
Reproduce:
Modify /etc/hotplug.d/firmware/*, or called settings to log to a file:
root@OpenWrt:~# grep -r hotplug.log /etc/hotplug.d/firmware/ /etc/hotplug.d/firmware/10-ath9k-eeprom: echo "$(date +%s): 10-ath9k-eeprom $ACTION" >> /tmp/hotplug.log /etc/hotplug.d/firmware/11-ath10k-caldata: echo "$(date +%s): 11-ath10k-eeprom $ACTION" >> /tmp/hotplug.log root@OpenWrt:~# grep -r hotplug.log /lib/functions/caldata.sh echo "$(date +%s): caldata sysfsload_from_file $ACTION" >> /tmp/hotplug.log
root@OpenWrt:~# cat /tmp/hotplug.log 1607349214: caldata sysfsload_from_file add 1607349214: 11-ath10k-eeprom add 1607349214: caldata sysfsload_from_file remove 1607349214: 11-ath10k-eeprom remove 1607349218: 10-ath9k-eeprom add 1607349218: caldata sysfsload_from_file add 1607349219: 10-ath9k-eeprom remove 1607349219: caldata sysfsload_from_file remove
Uhm, so it works as expected? I am unable to deduce what is wrong from your description.
It works, but I would not expect the caldata extraction functions to be run for $ACTION=remove?
logread has an error for it:
We should be able to save some cpu cycles if we only run on $ACTION=add for functions where we modify the caldata (like ath9k_patch_mac) before loading it?