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

improve compatibility with FreeBSD #5159

Merged
merged 1 commit into from
Jun 17, 2024
Merged

Conversation

themarek
Copy link

It is related to this bug report: opnsense/plugins#3525

FreeBSD's sed doesn't have the -z option, so empty certificates are delivered to vault when running the script on FreeBSD.

@Neilpang
Copy link
Member

can you please try with:

_ckey=$(tr '\n' '\\n' <"$2")

@themarek
Copy link
Author

Thank you for the suggestion!
It doesn't work :(

OPNsense:~ # printf "ab\ncd\n"
ab
cd

OPNsense:~ # printf "ab\ncd\n" | awk '{printf "%s\\n",$0}'
ab\ncd\n

OPNsense:~ # printf "ab\ncd\n" | tr '\n' '\\n'
ab\cd\


ubuntu:~ # printf "ab\ncd\n" | awk '{printf "%s\\n",$0}'
ab\ncd\n

ubuntu:~ # printf "ab\ncd\n" | tr '\n' '\\n'
ab\cd\


macos:~ # printf "ab\ncd\n" | awk '{printf "%s\\n",$0}'
ab\ncd\n

macos:~ # printf "ab\ncd\n" | tr '\n' '\\n'
ab\cd\

@themarek
Copy link
Author

@Neilpang Can I provide more information to support the merge? :-)

@Neilpang
Copy link
Member

can you implement without awk ?

it is related to this bug report: opnsense/plugins#3525

FreeBSD's sed doesn't have the -z option, so empty certificates are delivered to vault when running the script on FreeBSD.
@themarek
Copy link
Author

@Neilpang I changed it to a version with sed.

@Neilpang Neilpang merged commit 9a0e15c into acmesh-official:dev Jun 17, 2024
2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants