This fixes errors like:
RunRoot is pointing to a path (/run/user/$ID/containers) which is not writable. Most likely podman will fail.
Error: creating events dirs: mkdir /run/user/$ID: permission denied
Signed-off-by: Zack Cerza <zack@cerza.org>
fi
if command -v podman; then
+ if ! [ -d /run/user/$(id -u) -a -w /run/user/$(id -u) ]; then
+ sudo loginctl enable-linger $(id -nu)
+ fi
PODMAN_MAJOR_VERSION=$(podman version -f json | jq -r '.Client.Version|split(".")[0]')
if [ "$PODMAN_MAJOR_VERSION" -ge 4 ]; then
PODMAN_DIR="$HOME/.local/share/containers"