fix: root podman D-Bus cgroup issue in ISO build
When running as sudo, root podman can't reach the systemd D-Bus session, causing "Transport endpoint is not connected" errors. Auto-detect and fall back to cgroupfs cgroup manager. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
4f90cf39cf
commit
6be30b99fa
@ -186,6 +186,15 @@ check_tools() {
|
|||||||
|
|
||||||
echo "Using container runtime: $CONTAINER_CMD"
|
echo "Using container runtime: $CONTAINER_CMD"
|
||||||
|
|
||||||
|
# Fix root podman D-Bus issue (sd-bus: Transport endpoint is not connected)
|
||||||
|
# When running as sudo, systemd cgroup manager can't reach the user D-Bus session.
|
||||||
|
if [ "$CONTAINER_CMD" = "podman" ] && [ "$(id -u)" = "0" ]; then
|
||||||
|
if ! $CONTAINER_CMD run --rm debian:bookworm true 2>/dev/null; then
|
||||||
|
echo " Root podman D-Bus issue detected, using cgroupfs manager"
|
||||||
|
CONTAINER_CMD="podman --cgroup-manager=cgroupfs"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Ensure insecure registry config for Archipelago app registry (HTTP)
|
# Ensure insecure registry config for Archipelago app registry (HTTP)
|
||||||
if [ "$CONTAINER_CMD" = "podman" ]; then
|
if [ "$CONTAINER_CMD" = "podman" ]; then
|
||||||
mkdir -p /etc/containers/registries.conf.d
|
mkdir -p /etc/containers/registries.conf.d
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user