vyatta-wireguard-installer icon indicating copy to clipboard operation
vyatta-wireguard-installer copied to clipboard

Unnecessary prompt for "commit" after upgrade script runs

Open Danabw opened this issue 4 years ago • 5 comments

After the upgrade script completes (./wireguard.sh upgrade) there is a prompt to enter "commit" to save changes, but it appears that the commit/save is already completed by the current version of the script. Should that request to enter "commit" be removed?

Danabw avatar Jul 17 '20 14:07 Danabw

I guess we could hide the output but we'd want to show it if there's an error, not sure if the message is identical on all systems.

mafredri avatar Jul 17 '20 14:07 mafredri

K, thanks for the additional context. It's not a huge deal, just a little confusing for a few moments, and I wanted to be sure you were aware of it. :)

Thanks again for this script, it makes this so easy and fool-proof.

Danabw avatar Jul 17 '20 20:07 Danabw

This is due to the "load" command, right?

reload_config() {
	echo "Reloading configuration..."
	config begin
	config load  <<----
	config commit
	config end
}

When you run this, vyatta says "Load complete. Use 'commit' to make changes active."

SlothCroissant avatar Oct 07 '20 16:10 SlothCroissant

@SlothCroissant yeah, that's correct.

mafredri avatar Oct 07 '20 18:10 mafredri

Could one just add an extra echo to clarify things?

reload_config() {
	echo "Loading configuration..."
	config begin
	config load
	echo "Commiting configuration..."
	config commit
	config end
}

BrianG61UK avatar Dec 05 '21 23:12 BrianG61UK