Commit 0b0a7b31 authored by Simo Leone's avatar Simo Leone Committed by Dan McGee
Browse files

Change unionfs module loading



Checking /proc/filesystems for unionfs is
friendlier for kernels with unionfs builtin.
Also, a total lack of unionfs now causes
makechrootpkg to bail out.

Signed-off-by: default avatarSimo Leone <simo@archlinux.org>
Signed-off-by: default avatarDan McGee <dan@archlinux.org>
parent e0f139ad
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -104,7 +104,13 @@ cleanup ()

uniondir="$chrootdir/union"
echo "building union chroot"
grep -Fq unionfs /proc/filesystems
if [ $? -ne 0 ]; then
    modprobe -q unionfs
    if [ $? -ne 0 ];
        echo "ERROR: No unionfs available. Abandon ship!" && exit 1
    fi
fi
mount -t unionfs none -o "dirs=$chrootdir/rw=rw:$chrootdir/root=ro" "$uniondir"
trap 'cleanup' 0 1 2 15