lix/lib/clearopaques.sh

15 lines
657 B
Bash

#!/bin/sh -e
clearopaques() {
# opaque directories are created when a layer creates a directory that does
# not exist in one of its currently mounted lower layers. preserving the
# layer's illusion of being the progenitor of a directory when mounted with
# different lower layers is incompatible with lix's operation, and blocking
# another layer's files in general is unsupported behavior as far as lix is
# concerned. this strips all directories of the "opaque" attribute.
find "$1" -type d -exec setfattr -x trusted.overlay.opaque {} \; 2>/dev/null \
|| true # find returns nonzero if no 'opaque' files were found.
}