NLnetLabs / unbound

Unbound is a validating, recursive, and caching DNS resolver.
https://nlnetlabs.nl/unbound
BSD 3-Clause "New" or "Revised" License
3.08k stars 349 forks source link

unbound-control-setup hangs while testing for openssl presence starting from version 1.21.0 #1126

Closed psumbera closed 1 month ago

psumbera commented 1 month ago
# bash -x unbound-control-setup
+ DESTDIR=/etc/unbound
+ SERVERNAME=unbound
+ CLIENTNAME=unbound-control
+ DAYS=7200
+ BITS=3072
+ HASH=sha256
+ SVR_BASE=unbound_server
+ CTL_BASE=unbound_control
+ RECREATE=0
+ umask 0027
+ set -eu
+ OPTIND=1
+ getopts d:hr arg
+ shift 0
+ openssl
^C

Changing: if ! openssl >/dev/null 2>&1; then to if ! openssl </dev/null >/dev/null 2>&1; then resolves the issue.

Tested on Solaris.

wcawijngaards commented 1 month ago

Thank you for the bugfix! I guess it was not noticed by others, as the script is called by another and the terminal is then not set. The suggested change is made to the code repository, fixed typo in issue title.

egtvedt commented 1 month ago

I stumbled into this myself, glad to see it fixed.

I suspect this is a change in behavior between OpenSSL >= 3. OpenSSL >= 3 will exit fast when just executed with the help text. However, in OpenSSL 1.1.1 it enters an interactive shell.