Skip to content

Commit 0746c6e

Browse files
committed
Do not bind mount /etc/pki blindly
Since ubuntu sometimes has /etc/pki/fwupd with little else in there, let's just bind mount /etc/pki when /etc/pki/tls exists. This keeps Fedora-based distros running and should fix this specific corner case observed on ubuntu. Co-Authored-By: Akos Eros <[email protected]> Closes: validatedpatterns/medical-diagnosis#130
1 parent e3e7add commit 0746c6e

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)