fix: Remove Boot requirement from workspace to avoid audit error

- Remove Boot=yes from workspace.nspawn configuration
- Use machinectl shell directly without starting/booting container
- Avoids "Failed to reset audit login UID" error in nested containers
- machinectl shell works with non-booted containers via namespace entry
This commit is contained in:
Claude
2025-11-07 18:14:24 +00:00
parent 7b0cb8e183
commit 111fa7b828

View File

@@ -35,7 +35,6 @@ echo "Creating workspace container configuration..."
mkdir -p $ROOTFS/etc/systemd/nspawn mkdir -p $ROOTFS/etc/systemd/nspawn
cat > $ROOTFS/etc/systemd/nspawn/workspace.nspawn <<'EOF' cat > $ROOTFS/etc/systemd/nspawn/workspace.nspawn <<'EOF'
[Exec] [Exec]
Boot=yes
ResolvConf=copy-host ResolvConf=copy-host
[Files] [Files]
@@ -76,8 +75,6 @@ if [[ -o login ]] && [[ -o interactive ]]; then
if [[ -z "$INSIDE_WORKSPACE" ]]; then if [[ -z "$INSIDE_WORKSPACE" ]]; then
# Running as ai user on aios OS - enter workspace container # Running as ai user on aios OS - enter workspace container
export INSIDE_WORKSPACE=1 export INSIDE_WORKSPACE=1
sudo machinectl start workspace 2>/dev/null || true
sleep 1
exec sudo machinectl shell workspace exec sudo machinectl shell workspace
else else
# Running as root inside workspace container - start claude # Running as root inside workspace container - start claude