Skip to content

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.

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