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: Simo Leone <simo@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
e0f139ad0e
commit
0b0a7b3140
|
@ -104,7 +104,13 @@ cleanup ()
|
||||||
|
|
||||||
uniondir="$chrootdir/union"
|
uniondir="$chrootdir/union"
|
||||||
echo "building union chroot"
|
echo "building union chroot"
|
||||||
modprobe -q unionfs
|
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"
|
mount -t unionfs none -o "dirs=$chrootdir/rw=rw:$chrootdir/root=ro" "$uniondir"
|
||||||
trap 'cleanup' 0 1 2 15
|
trap 'cleanup' 0 1 2 15
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue