libcontainers-common/container-storage-driver.sh
Richard Brown b5434941fa Accepting request 1036692 from home:dirkmueller:Factory
- add container-storage-driver.sh (bsc#1197093)

- postinstall script: slight cleanup, no functional change

OBS-URL: https://build.opensuse.org/request/show/1036692
OBS-URL: https://build.opensuse.org/package/show/devel:microos/libcontainers-common?expand=0&rev=9
2022-11-21 13:02:48 +00:00

10 lines
474 B
Bash

if test "$(id -u)" -gt "0" && test -d "$HOME"; then
if test ! -e "$HOME"/.config/containers/storage.conf && 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