Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unnecessary prompt for "commit" after upgrade script runs #21

Open
Danabw opened this issue Jul 17, 2020 · 5 comments
Open

Unnecessary prompt for "commit" after upgrade script runs #21

Danabw opened this issue Jul 17, 2020 · 5 comments

Comments

@Danabw
Copy link

Danabw commented Jul 17, 2020

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?

@mafredri
Copy link
Owner

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.

@Danabw
Copy link
Author

Danabw commented Jul 17, 2020

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.

@SlothCroissant
Copy link

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."

@mafredri
Copy link
Owner

mafredri commented Oct 7, 2020

@SlothCroissant yeah, that's correct.

@BrianG61UK
Copy link

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
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants