Skip to content

Commit c0c2c1e

Browse files
authored
Merge pull request #619 from mbaldessari/etc-pki
Do not bind mount /etc/pki blindly
2 parents b9140d1 + 0746c6e commit c0c2c1e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

scripts/pattern-util.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,10 @@ fi
6464
# if we are using podman machine then we do not bind mount anything (for now!)
6565
REMOTE_PODMAN=$(podman system connection list -q | wc -l)
6666
if [ $REMOTE_PODMAN -eq 0 ]; then # If we are not using podman machine we check the hosts folders
67-
# Use /etc/pki by default and try a couple of fallbacks if it does not exist
68-
if [ -d /etc/pki ]; then
67+
# We check /etc/pki/tls because on ubuntu /etc/pki/fwupd sometimes
68+
# exists but not /etc/pki/tls and we do not want to bind mount in such a case
69+
# as it would find no certificates at all.
70+
if [ -d /etc/pki/tls ]; then
6971
PKI_HOST_MOUNT_ARGS="-v /etc/pki:/etc/pki:ro"
7072
elif [ -d /etc/ssl ]; then
7173
PKI_HOST_MOUNT_ARGS="-v /etc/ssl:/etc/ssl:ro"

0 commit comments

Comments
 (0)