Merge pull request #178 from AkihiroSuda/rootless-safe-fallback

rootless-install.sh: use safer XRD on non-systemd hosts
This commit is contained in:
Sebastiaan van Stijn authored and GitHub committed 2020-06-22 11:48:23 +02:00
commit ca9ffdfa16
1 file changed
+3 -2
+3 -2
View File
@@ -101,8 +101,8 @@ checks() {
>&2 echo "- or simply log back in as the desired unprivileged user (ssh works for remote machines)"
exit 1
fi
export XDG_RUNTIME_DIR="/tmp/docker-$(id -u)"
mkdir -p "$XDG_RUNTIME_DIR"
export XDG_RUNTIME_DIR="$HOME/.docker/run"
mkdir -p -m 700 "$XDG_RUNTIME_DIR"
XDG_RUNTIME_DIR_CREATED=1
fi
@@ -307,6 +307,7 @@ print_instructions() {
echo "# Make sure the following environment variables are set (or add them to ~/.bashrc):\n"
if [ -n "$XDG_RUNTIME_DIR_CREATED" ]; then
echo "# WARN: systemd not found. You have to remove XDG_RUNTIME_DIR manually on every logout."
echo "export XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR"
fi