Преглед изворни кода

Skip in-container pcscd when host socket is mounted

If /var/run/pcscd/pcscd.comm exists (from a host bind-mount),
the entrypoint now skips starting pcscd inside the container,
supporting the recommended pattern of running pcscd on the host.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Carl Tashian пре 8 месеци
родитељ
комит
3c1e713aad
1 измењених фајлова са 5 додато и 1 уклоњено
  1. 5 1
      docker/entrypoint.sh

+ 5 - 1
docker/entrypoint.sh

@@ -97,7 +97,11 @@ function step_ca_init () {
 }
 
 if [ -f /usr/sbin/pcscd ]; then
-    /usr/sbin/pcscd --disable-polkit
+    if [ -e /var/run/pcscd/pcscd.comm ]; then
+        echo "Using host pcscd (socket detected at /var/run/pcscd/pcscd.comm)"
+    else
+        /usr/sbin/pcscd --disable-polkit
+    fi
 fi
 
 if [ ! -f "${STEPPATH}/config/ca.json" ]; then