The UI uses opkg to check package status which can cause a lock clash if the reinstall script is running. Retry opkg commands in the script if this happens, and also avoid reading package status in the UI until the reinstall is complete.
* Add network detection and retry * Add message when package reinstall is happening * Update permenant package list