Hey guys. I am trying to work around an issue I can't seem to solve - X86/64 sysupgrade losing settings (F2FS)?
I have written a small script that checks for DDNS being configured, and, when that is not the case, pulls in a backup to restore the device's settings. The script itself works fine - if I run sh /rom/etc/uci-defaults/99_restore
then I see everything being done.
However, the script being integrated in my own builds, after sysupgrading it seems the script hasn't been run. DDNS is still in its default state (disabled), so the script should have been run, and configuration restored, but that's not the case.
Contents of the script:
# Check if DDNS is enabled. If not, pull in the backup from a local server.
# Abort if download doesn't complete.
/bin/grep enabled /etc/config/ddns || \
/usr/bin/curl http://10.0.0.30/dl/backup-openwrt.tar.gz -o /tmp/backup.tar.gz || exit 1
/sbin/sysupgrade -v -r /tmp/backup.tar.gz
/sbin/reboot