Skip to content

Commit bec7d88

Browse files
committed
cmdlib: only do overlayfs check in privileged path
It's only in the privileged path where we're composing directly to the filesystem that we care about whether we're on overlayfs or not. In the unprivileged path, the compose happens on a real filesystem on the cache qcow2 within supermin, so there's no need to restrict what filesystem the workdir itself on the outside is sitting on.
1 parent 58df48e commit bec7d88

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/cmdlib.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@ prepare_build() {
157157
fatal "No ${workdir}/builds found; did you run coreos-assembler init?"
158158
fi
159159

160-
if [ "$(stat -f --printf="%T" .)" = "overlayfs" ] && [ -z "${COSA_SKIP_OVERLAY:-}" ]; then
161-
fatal "${workdir} must be a volume"
160+
if has_privileges && [ "$(stat -f --printf="%T" .)" = "overlayfs" ] && [ -z "${COSA_SKIP_OVERLAY:-}" ]; then
161+
fatal "${workdir} must be a volume when privileged"
162162
fi
163163

164164
if test '!' -w "${workdir}"; then

0 commit comments

Comments
 (0)