opnsense-revert opnsense fails

Started by Greelan, March 23, 2026, 04:14:10 AM

Previous topic - Next topic
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

If you had FreeBSD repo enabled you have bigger fish to fry because it upgraded pkg to an incompatible version.


Cheers,
Franco

March 24, 2026, 11:41:15 AM #4 Last Edit: March 24, 2026, 12:08:44 PM by Greelan
Yes, as I said. It was not me who enabled it though. This only occurred when I had to abort the opnsense-revert script. Somehow that caused the OPNsense repo to be disabled and the FreeBSD repo to be enabled