diff options
author | Wojtek Kosior <koszko@koszko.org> | 2022-11-21 21:07:35 +0100 |
---|---|---|
committer | Wojtek Kosior <koszko@koszko.org> | 2022-11-21 21:07:35 +0100 |
commit | 3cf3d7852ce2639fc3d9f9de3a82384a60c9ac2c (patch) | |
tree | 0fa5112ead7c58974a31973bb9bf713027825bcd | |
parent | f0c60194afef6f5a54cd61f0b9dc3df1e11f45a7 (diff) | |
download | koszko-org-server-3cf3d7852ce2639fc3d9f9de3a82384a60c9ac2c.tar.gz koszko-org-server-3cf3d7852ce2639fc3d9f9de3a82384a60c9ac2c.zip |
avoid using `--map-user` and `--map-group` options to `unshare` since they are absent in older versions of util-linux
-rw-r--r-- | Makefile | 3 | ||||
-rwxr-xr-x | fake-client-setup-mounts.sh | 5 |
2 files changed, 2 insertions, 6 deletions
@@ -61,8 +61,7 @@ enter-container: pidfile /run/current-system/profile/bin/bash --login fake-client: fake-client-setup-mounts.sh hosts - unshare --map-root-user --mount ./$< \ - "$${SHELL:-/bin/sh}" "$$(id -ru)" "$$(id -rg)" + unshare --map-root-user --mount ./$< "$${SHELL:-/bin/sh}" install: container.scm sdists cp guix-container.sh /etc/init.d/guix-container diff --git a/fake-client-setup-mounts.sh b/fake-client-setup-mounts.sh index c00a0e5..9ad1e76 100755 --- a/fake-client-setup-mounts.sh +++ b/fake-client-setup-mounts.sh @@ -9,10 +9,7 @@ set -e SHELL_TO_USE="$1" -USER_ID_TO_USE="$2" -GROUP_ID_TO_USE="$3" mount --bind hosts /etc/hosts; mount -t tmpfs dummy /var/run/nscd 2>/dev/null || true; -unshare --map-user="$USER_ID_TO_USE" --map-group="$GROUP_ID_TO_USE" \ - "$SHELL_TO_USE" +unshare "$SHELL_TO_USE" |