Univention Bugzilla – Bug 39045
ssl/host/extensions example doesn't work
Last modified: 2016-07-21 15:16:08 CEST
The example uses something like: hostname=${fqdn/.*/} This does not work in dash (which is used there via /bin/sh symlink if executed via listener). We could either identify why this is executed with /bin/sh (dash) or adjust the example to something ugly like: hostname=$(echo $fqdn | cut -d "." -f1) ;)
2015072821000494
(In reply to Tim Petersen from comment #0) > The example uses something like: > hostname=${fqdn/.*/} > > This does not work in dash (which is used there via /bin/sh symlink if > executed via listener). > > We could either identify why this is executed with /bin/sh (dash) or adjust > the example to something ugly like: > hostname=$(echo $fqdn | cut -d "." -f1) Use "${fqdn%%.*}", which is POSIX - no need for fork() / pipe() / ... $ (fqdn=`hostname -f`;hostname=${fqdn%%.*};echo "fqdn=$fqdn hostname=$hostname";) fqdn=stave.knut.univention.de hostname=stave
r70560 | Bug #39045 ssl: Fix extensions-example.sh to work with POSIX shell Package: univention-ssl Version: 10.0.0-12.169.201606231402 Branch: ucs_4.1-0 Scope: errata4.1-2 r70578 | Bug #39045 ssl: YAML univention-ssl.yaml
Code review: OK Advisory: OK
<http://errata.software-univention.de/ucs/4.1/213.html>