Skip to content

Commit

Permalink
try workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
lleyton committed Nov 23, 2024
1 parent 673474b commit 9987e72
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion katsu/modules/base/polycrystal.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
#!/bin/bash -x
set -euo pipefail

cleanup() {
for mnt in sys proc; do
umount /mnt/mock-mount/$mnt
done
umount /mnt/mock-mount
umount /mnt/mock-mount
}

if [ -x "$(command -v polycrystal)" ]; then
polycrystal
trap cleanup EXIT
mkdir -p /mnt/mock-mount
mount --bind / /mnt/mock-mount
mount --make-private /mnt/mock-mount
mount --bind /mnt/mock-mount /mnt/mock-mount
for mnt in proc sys; do
mount --bind /$mnt /mnt/mock-mount/$mnt
done

chroot /mnt/mock-mount bash -c polycrystal
fi

0 comments on commit 9987e72

Please sign in to comment.