-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
easyrsa: 319: set: Illegal option -o echo #308
Comments
How do you run easyrsa3 without a terminal ? |
|
This is a pretty easy fix. I'll work on getting it in over the next couple days. Just need to wrap hide_read_pass with test -t I think. Need to do some testing. |
I think I am hitting the same bug. I am using easyrsa in combination with an ansible playbook.
|
Can @HarmtH or @merlin-tc try this in your use cases? Replace/modify the hide_read_pass() function to look like the following:
|
I've actually hit this https://github.com/OpenVPN/easy-rsa/blob/master/easyrsa3/easyrsa#L320 instance of I think this fix will work, but this will only fix the problem when |
The other command is for an attempt to work with the sh we ship for windows. Nothing to do for now until we move away from writing cross platform shell scripts. I’ll try to update on L320 today.
Eric Crist
… On May 17, 2019, at 10:01 AM, Harm te Hennepe ***@***.***> wrote:
I've actually hit this https://github.com/OpenVPN/easy-rsa/blob/master/easyrsa3/easyrsa#L320 instance of set -o echo. Can you update it there as well?
I think this fix will work, but this will only fix the problem when stty fails due to no terminal, set -o echo will still be executed when stty fails for other reasons.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Yes I know. The annoying thing is that an illegal |
Come to think of it, perhaps we can try setting the option in a subshell, and then set it for real if that succeeds:
No unexpected aborts possible this way. |
@HarmtH your command works when called via ansible or a non interactive shell. |
(OpenWrt) ash does not have "set -o echo".
But it does not have stty as well. The only viable option here is "read -s". I'll PR something... |
It seems that |
|
It is.. when available. There is no stty by default in OpenWrt. 'read -s' also works in ash while it does not accept 'set -o echo'. |
Can we please keep separate issues in separate tickets. |
@TinCanTech , my fault. I got here because the same "set -o echo" abort issue got me. However, it was not because it's not a terminal but because there is no 'set -o echo' in ash. Part of my PR #315 is just like @HarmtH suggested: using a subshell in order to silently test for 'set -o echo' support and avoid shell to abort when it got the illegal option. This discussion might be more "on topic" there. |
i'm getting this error during pivpn installation
|
No, this is called within the easyrsa script, and it is illegal on all shells tested and reported above. I'm not sure what this aims to do, but if it is valid on any shell, then probably easyrsa should check whether it's EDIT: Ah I see now the actual fix: #315 |
I'm running easy-rsa without a terminal and therefore the stty calls in the script fail.
As fallback
set +o echo
andset -e echo
are used, but these settings don't seem to exist, at least not in zsh, bash or dash.The text was updated successfully, but these errors were encountered: