1
0
libcontainers-common/container-storage-driver.sh
Richard Brown c531fd356c Accepting request 1038604 from home:dirkmueller:Factory
- add requires on util-linux-systemd for findmnt in profile script
- only set storage_driver env when no libpod exists
- avoid quoting issue

OBS-URL: https://build.opensuse.org/request/show/1038604
OBS-URL: https://build.opensuse.org/package/show/devel:microos/libcontainers-common?expand=0&rev=11
2022-11-28 12:26:36 +00:00

12 lines
562 B
Bash

if test "$(id -u)" -gt "0" && test -d "$HOME"; then
if test ! -e "$HOME"/.config/containers/storage.conf && \
test ! -e "$HOME"/.local/share/containers/storage/libpod && \
grep -qx "driver = .*btrfs.*" /etc/containers/storage.conf ; then
if test "$(findmnt -o FSTYPE -l --target "$HOME" | grep -v FSTYPE)" != "btrfs"; then
# Home partition is not btrfs, but system wide setting is to use btrfs, this won't work
# default to 'overlay' then
export STORAGE_DRIVER=overlay
fi
fi
fi