Weird problem. I've been experimenting with some patches, and have routinely successfully reverted them by "opnsense-revert opnsense".
But on the latest try, it is stuck at ">>> Invoking update script 'refresh.sh'"
Previously I interrupted the script at this point and then tried again, but it complained that the OPNsense package repo conf was not available. So I copied that back from the sample, but the script still gets stuck.
Any tips how to fix this?
I've managed to deal with that - that wasn't fun.
It appears that when I had to abort opnsense-revert because it hung, the FreeBSD repo was somehow enabled. Then when I ran opnsense-revert again, pkg was updated to the FreeBSD version (2.5.1), which obviously led to some conflicts.
I had to go through a process of disabling the repo, deleting the pkg database, and force reinstalling OPNsense. Then checking there weren't any rogue packages on the system from the FreeBSD repo.
Ugh.
FWIW, it seems that the original "hung" state of opnsense-revert was caused by a file lock on config.xml by configd, which prevented run_migrations.php from acquiring it